# Thread: Variation of Parameters Diff EQ

1. ## Variation of Parameters Diff EQ

Hey all,

heres the differential equation to be solved using Variation of parameter's:

y" + y = sin(x)^2

i got this far:

u1'cos(2x) + u2'sin(2x) =0
-2*u1'*sin(2x) + 2*u2'*cos(2x) = sin(x)^2

solving for u1' gives: (-sin(x)^2*sin(2x))/2

and u2': (-sin(x)^2*cos(2x))/2

The final solution should take the form

u1*cos(2x) + u2*sin(2x)

so whats left is integrating u1' and u2'. Unfortunately due to problems with integrating and simplfying trig expressions i'm not getting the solution which is

1/8(1-xsin(2x))

thanks alot

2. ## The double formulas

This may help with your integrals

$\displaystyle sin(2\theta)=2sin(\theta)cos(\theta)$

and

$\displaystyle cos(2\theta)=1-2sin^2(\theta)$

so

$\displaystyle u_1=\frac{1}{2}\int\sin^3(x)cos(x)dx$

the other

$\displaystyle u_2=-\frac{1}{2}\int\sin^2(x)(1-2sin^2(x))dx$

You can use the reduction formula for u2 or the half angle formula

I hope this helps

3. Let me see if I have this correct...

$\displaystyle y''+y=\sin^2(x)$

If this is the case then our complementry solution is

$\displaystyle y=c_1\sin(x)+c_2\cos(x)$

so computing the wronskian
$\displaystyle \begin{vmatrix}\sin(x) & \cos(x) \\ \cos(x) & -\sin(x)\end{vmatrix}=-1$

then

$\displaystyle w_1=\begin{vmatrix}0 & \cos(x) \\ \sin^2(x) & -\sin(x)\end{vmatrix}=-\cos(x)\sin^2(x)$

and

$\displaystyle w_2=\begin{vmatrix}\sin(x) & 0 \\ cos(x)& \sin^2(x)\end{vmatrix}=\sin^3(x)$

this would give the integrals

$\displaystyle \int\cos(x)\sin^2(x)dx$

and

$\displaystyle -\int\sin^3(x)dx$

4. i'm so sorry.

its acutally y" +4y = sin(x) ^2

this is why it takes the form

c1*cos(2x) + c2(sin(2x)

5. Alright, lets try this again...

$\displaystyle y''+4y=\sin^2(x)$

If this is the case then our complementry solution is

$\displaystyle y=c_1\sin(2x)+c_2\cos(2x)$

so computing the wronskian
$\displaystyle \begin{vmatrix}\sin(2x) & \cos(2x) \\ 2\cos(2x) & -2\sin(2x)\end{vmatrix}=-2$

then

$\displaystyle w_1=\begin{vmatrix}0 & \cos(2x) \\ \sin^2(x) & -2\sin(x)\end{vmatrix}=-\cos(2x)\sin^2(x)$

and

$\displaystyle w_2=\begin{vmatrix}\sin(2x) & 0 \\ 2\cos(x)& \sin^2(x)\end{vmatrix}=\sin^2(x)\sin(2x)$

this would give the integrals

$\displaystyle \frac{1}{2}\int\cos(2x)\sin^2(x)dx$

and

$\displaystyle -\frac{1}{2}\int\sin^2(x)\sin(2x)dx$

$\displaystyle \frac{1}{2}\int\cos(2x)\sin^2(x)dx=\frac{1}{2}\int (1-2\sin^2(x))\sin^2(x)dx =$

$\displaystyle \frac{1}{2}\int\sin^2(x)dx-\int(\sin^2(x))^2dx$

by the double angle formula...

$\displaystyle \frac{1}{2}\int2\sin(x)\cos(x)dx-\int(2\sin(x)\cos(x))^2dx=$

$\displaystyle \int\sin(x)\cos(x)dx-4\int\sin^2(x)\cos^2(x)dx =$

using the double angle formula again on sine...

$\displaystyle \int\sin(x)\cos(x)dx-4\int2\sin(x)\cos(x)\cos^2(x)dx =$
$\displaystyle \int\sin(x)\cos(x)dx-8\int\sin(x)\cos^3(x)dx$

finally, now we let $\displaystyle u=\cos(x)$ and $\displaystyle du=-\sin(x)dx$
This yeilds...$\displaystyle u_1=-\frac{1}{2}\cos^2(x)+2\cos^4(x)$

$\displaystyle u_2$ is a bit better

$\displaystyle -\frac{1}{2}\int\sin^2(x)\sin(2x)dx$
rewritting with the double angle formula

$\displaystyle -\frac{1}{2}\int\sin^2(x)(2\sin(x)\cos(x))dx=-\int\sin^3(x)\cos(x)dx$

with $\displaystyle u=sin(x)$ and$\displaystyle du=\cos(x)dx$ we get

$\displaystyle u_2=-\frac{1}{4}\sin^4(x)$

I hope this gets it...

but it seems when i try to get my final particular solution in the form

yp = u1*sin(2x) + u2*cos(2x)

i'm not getting the solution

1/8(1-x*sin(2x))

am i wrong in saying the particular solution yp should be in the form

yp = u1*sin(2x) + u2*cos(2x)

7. I get it now, thanks alot