Welcome to an example on how to use the variation
of parameters method to solve a linear second order
nonhomogeneous differential equation.
So we'll be solving a differential equation
in this form here,
where g[x] is not zero, and the general solution
will be equal to y[x] equals y sub c,
the complementary function plus Y sub p,
a particular solution,
which can also be written in this form here,
where y sub one and y sub two
form a fundamental set of solutions
to the corresponding homogeneous differential equation.
So our first step will be to solve the corresponding
homogeneous differential equation,
which will give us y sub c.
And then we'll find Y sub p, using the variation
of parameters formula given here.
And then we can form a general solution
using y sub c and Y sub p.
So let's take a look at our example.
We want to solve the given differential equation
and state an interval for the solution.
So the first thing we should notice is that
we do have a linear second order
non-homogeneous differential equation,
so for step one, we will solve the corresponding
homogeneous differential equation,
which would be y double prime plus y equals zero.
And because we have constant co-efficients,
we can solve this using a characteristic equation
where a would be equal to one,
b the co-efficient of y prime would be zero,
and c would be one.
And therefore the characteristic equation would be
r squared plus one
equals zero.
To solve this for r, let's subtract one on both sides.
That would be r squared equals negative one,
and now we'll take the square root
of both sides of the equation.
The square-root of negative one is equal to i,
so we have r equals plus or minus i.
So we have a complex solution
to the characteristic equation,
which tells us that y sub c,
for the general solution to the corresponding
homogeneous differential equation
will be in this form here
where the complex solution would be alpha
plus or minus beta i.
So for alpha plus or minus beta i,
since our solutions are plus or minus i
or plus or minus one i, this tells us that alpha
would be zero and beta is equal to one.
Which means that y sub c, the complimentary function,
for the general solution to the corresponding
homogeneous differential equation
would be c sub one.
This should be e to the zero, which is one cosine x,
plus c sub two, again you do the zero as one.
We'd have sine x.
Now that we have the complimentary function,
or y sub c, we'll now find Y sub p,
and then form the general solution.
Let's go and do this on the next slide.
Let's begin by determining the wronskian
of y sub one and y sub two.
Notice that y sub one would be cosine x
and y sub two would be equal to sine x.
So the wronskian of y sub one comma y sub two
is going to be a two by two determinant
where the first row will be y sub one and y sub two,
so we have cosine x,
sine x.
And the second row will be the first derivatives.
We'll have negative sine x and cosine x.
Now the determinant is going to be equal
to this product minus this product.
And this is going to work out very nicely.
We have cosine squared x
and then minus negative sine squared x,
which becomes plus sine squared x,
which is equal to positive one.
So now that we have the wronskian, let's go ahead
and set up our formula for Y sub p.
Y sub p is going to equal to negative y sub one,
or negative cosine x
times the integral.
Remember the wronskian is equal to one,
so we'll just have y sub two times g of x.
Y sub two is sine x.
And g of x is going to be equal to secant x.
And then we'll have plus y sub two, which is sine x,
times the integral of,
again, our denominator is one,
so we have y sub one times g of x,
or cosine x
times secant x,
dx.
Let's go ahead and simplify the integrands,
and then we'll integrate.
So we have Y sub p is equal to negative cosine x.
Secant x is equal to one over cosine x,
so let's write this as sine x divided by cosine x.
And these are reciprocal functions,
so this is just equal to one dx.
So now let's go ahead and take this
on the next slide and integrate.
Notice to integrate here,
we'll have to perform u substitution.
If we let u equal the denominator, cosine x,
then differential u is going to be equal to
negative sine x[dx].
So the integral would be negative one over u[du].
Factor the negative out, we're going to have
positive cosine x, the integral of one over u
would be natural log u, so in this case we have
natural log absolute value of cosine x,
and then we'll have plus integral of one
is just going to be x, so we have plus x sine x.
And this is a particular solution
to the non-homogeneous differential equation.
So now we can use
Y sub p.
And from the previous slide,
y sub c, the complimentary function,
to form the general solution.
So again, y sub c was equal to c sub one
cosine x plus c sub two sine x,
which means the general solution, which we'll call y[x],
is equal to y sub c plus Y sub p
or c sub one cosine x
plus c sub two sine x
plus cosine x
times natural log absolute value cosine x
plus x sine x.
Notice we're also asked to state
an interval for the solution,
and that's because, looking at the natural log function,
the argument of cosine x cannot equal zero,
because natural log zero does not exist.
And because we're taking the natural log
of the absolute value of cosine x,
let's use the open interval for x
from negative pi over two to pi over two.
Notice negative pi over two and positive pi over two
are not in this interval
because this is where cosine x would be zero.
And that'll do it for this example.
I hope you found this helpful.