>> Welcome to the Cypress College Math Review
on Variation of Parameters.
We wish to solve 2nd order nonhomogeneous equations
[variable] a sub 0, y double prime plus [variable] a sub 1 y
prime plus [variable] a sub 2 y equals F of x where F
of x is not a linear combination of the type x to the j e
to the x cosine of b x or x to the j e
to the [variable] a x sine of b x in which the method
of undetermined coefficients would have worked well for us.
Let u sub 1 and u sub 2 be linearly independent solutions
to the homogeneous equation L of y equals 0.
Then, y sub c equals c sub 1 times u sub 1 plus c sub 2 times
u sub 2 is the general solution to the homogeneous equation.
Let y sub p equal g sub 1 times u sub 1 plus g sub 2 times u sub
2 be a particular solution to the nonhomogeneous equation L
of y equals cap F of x. To find g sub 1 and g sub 2,
you solve the following system of equations here in this box.
I chose to use g sub 1 and g sub 2 instead
of the more standard cap c sub 1 and c sub 2 simply because,
in my opinion, c sub 1 and c sub 2 look
like constants from calc 1.
You should use what your instructor prefers you to use.
This is our first example.
First, we'll solve the homogeneous equation.
Here's our auxiliary equation.
So r is equal to 1 multiplicity 2.
So y sub c is equal to c sub 1 e to the x,
and then since it's multiplicity 2, of course,
we'd have c sub 2 x e to the x.
If it was multiplicity 3 we would have x squared e to the x.
So y sub p is going to be g sub 1 times e to the x
because our u sub 1 function is e
to the x. Our u sub 2 function is x e
to the x. Here's the system that we have to solve.
So now we have to take the first derivative,
so g sub 1 prime times the derivative of e to the x, which,
of course, is just e to the x plus g sub 2 prime,
and then here we have to take the derivative of x e to the x,
so we have the product rule.
So 1 times e to the x plus x e to the x, and that's equal
to our function cap F of x, which is e to the x over 2 x
over [variable] a sub naught.
And [variable] a sub naught in this case is just 1.
And then we have g sub 1 prime times u sub 1,
and u sub 1 is just e to the x plus,
plus g sub 2 prime times u sub 2,
which is just x e to the x equals 0.
This is the system of equations that we have to solve.
If we subtract, these terms on the left disappear,
these two terms disappear,
and we end up with simply g sub 2 prime times e
to the x equals e to the x over 2 x. Dividing,
we get g sub 2 prime equals 1 over 2 x. All right,
let's integrate to find g sub 2.
So g sub 2 is equal to 1/2 times the antiderivative of 1 over x,
which is 1/2 natural log of x plus c, correct?
But we don't put the plus c on.
Why? In the homogeneous solution you have plus c times u sub 1.
And our solution is going to have y sub p plus y sub c,
so we don't need to write plus c times u sub 1 again.
So erase that.
We'll rewrite that as natural log
of the square root of x. All right.
Now, the bottom line of our box is g sub 1 prime e
to the x plus g sub 2 prime x e to the x equals 0.
Solving for g sub 1 prime, we get negative g sub 2 prime x e
to the x over e to the x, where those e to the x's cancel.
We can replace g sub 2 prime with 1 over 2 x.
So I have 1 over 2 x there.
And there's an x there.
The e to the x's cancel, so we simply get negative 1/2.
So g sub 1, after I integrate, is negative 1/2 x. We're ready
to write our solution.
So y sub p, our particular solution to our nonhomogeneous,
is g sub 1 e to the x plus g sub 2 x e to x,
which in this case would be negative 1/2 x e
to the x plus natural log of the square root of x,
x e to the x. Y, of course, is always equal
to y sub c plus y sub p. So we get y sub c, which is c sub 1 e
to the x plus c sub 2 x e to the x plus y sub p,
which is negative 1/2 x e to the x plus natural log
of the square root of x, x e to the x, and then we notice
that the middle two terms are like terms, so we add them up.
We have a new constant times x e to the x,
and this gives us the solution to our differential equation.
For our next example,
the auxiliary equation is r squared plus 1 equals 0.
So the solutions are plus or minus i. So the solution
to the homogeneous equation is c sub 1 times cosine
of x plus c sub 2 times sine of x. So now we look
at the nonhomogeneous.
So y sub p is going to be g sub 1 times u sub 1.
And u sub 1 is cosine of x plus g sub 2 times u sub 2,
and u and sub 2 is going to be sine of x. Here's the system
of equations that we have to solve
to find g sub 1 and g sub 2.
So we have to take the derivative
of g 1 times the derivative of u 1, and u sub 1 is cosine.
So the derivative of cosine, of course,
is negative sine plus the derivative
of g sub 2 times the derivative of sine, which is cosine,
equals cap F of x, which is tangent
over [variable] a sub naught, which is 1.
In the next equation we have g sub 1 prime times u 1 plus g sub
2 prime times u sub 2 equals 0.
So this is the system of equations that we have to solve.
Looking at the second equation and solving for g sub 1 prime,
if we move the second term to the other side
and divide both sides by cosine of x,
we get negative g sub 2 prime times tangent
of x. Let's substitute that value in for g sub 1 prime
in the first equation.
So we get g sub 2 prime tangent of x. That's going in for,
that's going in for g sub 1 prime.
The negatives are canceling.
I still have that times the sine of x plus g sub 2 prime cosine
of x equals tangent of x. So we factor out a g sub 2 prime,
and we have tangent of x sine of x plus cosine
of x equals tangent of x. So g sub 2 prime is equal to tangent
of x divided by tangent of x times sine of x plus cosine
of x. Let's multiply that by cosine of x
over cosine of x. Why?
Because I can see that tangent of x in the denominator
over here is sine of x over cosine
of x. Let's see what we get.
When I multiply tangent times cosine, I get sine.
So in the numerator I get sine.
In the denominator tangent becomes sine,
so I get sine squared.
So I have sine squared plus cosine squared,
which is simply 1, which means
that whole function just becomes sine of x
because my denominator is 1.
[ Silence ]
Let's integrate to find g sub 2, the function.
So that would be negative cosine of x. Recall from above
that g sub 1 prime is equal to the opposite
of g sub 2 prime times tangent of x.
So that would be negative sine of x times tangent of x.
So now g sub 1 is equal to the antiderivative of that.
So we're integrating c. We have sine times tangent,
so that's what we're trying to integrate.
So sine squared in the numerator.
So sine squared is the same thing as 1 minus cosine squared,
and the opposite of 1 minus cosine squared is cosine squared
minus 1.
[ Silence ]
Our goal here, of course, is to get the cosine
out of the denominator.
So we're going to divide now.
So the numerator divided by the denominator.
So I have cosine of x minus 1 divided by cosine of x,
which is, of course, secant.
And now I can integrate.
So I have sine of x minus the antiderivative of secant,
which is natural log the absolute value of secant
of x plus tangent of x. And we're ready
to solve this differential equation.
So y sub p is equal to g sub 1 times u sub 1 plus g sub 2 times
u sub 2, which, in this case, is going to be the function sine
of x minus natural log of the absolute value of secant
of x plus tangent of x,
that quantity times the function u sub 1, which is cosine of x,
plus the function g sub 2, which is negative cosine,
times the function u sub 2, which is the function sine
of x. Those cancel out, and that simply gives me negative cosine
of x times natural log of the absolute value of secant
of x plus tangent of x. So the solution
to our differential equation is y sub c plus y sub p,
which is c sub 1 times u sub 1, which is cosine,
plus c sub 2 times u sub 2, which is sine, plus y sub p,
which is minus cosine of x times natural log
of the absolute value of secant of x plus tangent of x.
And that's the solution to our differential equation
by variation of parameters.
[ Silence ]
Here's our next example.
Our auxiliary equation is r squared minus 3 r plus 2
equals 0.
So our solutions are 2 and 1.
So the solution to our homogeneous is c sub 1 e
to the 2 x plus c sub 2 e to the x, so u sub 1 is going to be e
to the 2 x, u sub 2 is going to be e to the x, y sub p, then,
is going to be g sub 1 times e to the 2 x plus g sub 2 e
to the x. Our next task is to find g sub 1 and g sub 2.
Here's the system of equations we have to solve
to find g sub 1 and g sub 2.
So we take the derivative of g sub 1 times the derivative
of u sub 1, and the derivative of e to the 2 x is 2 e
to the 2 x plus the derivative of g sub 2 times the derivative
of e to the x equals cap F of x
over [variable] a sub naught, which is just 1.
The next equation has g sub 1 prime times u sub 1 plus g sub 2
prime times u sub 2 equals 0.
This is the system we have to solve.
Looking at the second equation, moving the first term
over to the other side, divide both sides by e to the x,
I get that g 2 prime is equal
to negative g 1 prime e to the x. All right.
I've copied down the second equation
so we can see what we're doing.
So we've solved for g sub 2 prime.
Let's substitute that in.
So we have 2 times g sub 1 prime e
to the 2 x minus g sub 1 prime e to the 2 x
on the left-hand side.
So now we have one of those, g sub 1 prime e
to the 2 x. Divide both sides by e to the 2 x,
and we have g sub 1 prime equals 1 over 1 plus e
to the 2 x. G sub 2 prime is equal
to negative g sub 1 prime times e to the x, which gives us
that g sub 2 prime is equal to negative e to the x
over 1 plus e to the 2 x. So now we have the derivative of each,
and we need to integrate to find g sub 1 and g sub 2.
[ Silence ]
Here's g sub 1 prime.
Let's integrate to find g sub 1.
A common trick to integrate this function would be to multiply
by e to the negative 2 x over itself.
So we have e to the negative 2 x over the quantity e
to the negative 2 x plus 1.
And now u substitution will work.
U equals the denominator, d u equals negative 2 e
to the negative 2 x d x. So we get negative 1/2 antiderivative
of 1 over u d u, which gives us negative 1/2 natural log
of the quantity 1 plus e to the negative 2 x.
And that's our function g sub 1.
Here's my function g sub 2 prime.
Let's integrate to find g sub 2.
We're going to do the same thing we did a minute ago
because a simple u substitution is not going to work.
We're going to multiply by e to the negative 2 x over itself.
In the numerator we have the opposite of e to the negative x.
In the denominator we have e to the negative 2 x plus 1.
Let u equal e to the negative x, so d u is equal to negative e
to the negative x d x. So we get d u over u squared plus 1,
which hopefully you recognize as arc tangent.
So we have arc tangent of e to the negative x.
And there's our function g sub 2.
All right.
Let's put this all together.
We know that y sub c, the solution to the homogeneous,
is c sub 1 e to the 2 x plus c sub 2 e to the x.
And the particular solution to the nonhomogeneous is g sub 1 e
to the 2 x plus g sub 2 e to the x. We solved and found
that g sub 1 was equal
to negative 1/2 times the natural log
of the quantity 1 plus e to the negative 2 x.
And g sub 2 was equal to arc tangent of e
to the negative x. Y is always equal to y sub c plus y sub p,
so the solution
to our differential equation is c sub 1 e
to the 2 x plus c sub 2 e to the x minus 1/2 natural log
of the quantity 1 plus e to the negative 2 x times e
to the 2 x plus arc tangent of e to the negative x times e
to the x. And there's the solution
to our differential equation.