# Math Help - Diff EQ--This is a tough one (for me atleast)

1. ## Diff EQ--This is a tough one (for me atleast)

I'm trying to use the variation of parameters method to find the geneneral solution of this equation:

y" + 2y' + 2y = 2(e^-x)(tan^2(x))

Here's the work I've done:

1. r^2 + 2r + 2 =0, so by quadratic, r= -1 + i, r=-1 - i
2. yc = c1(e^-x)cos(x) + c2(e^-x)sin(x)
3. yp = f1(e^-x)cos(x) + f2(e^-x)sin(x)
4. f'1(e^-x)cos(x) + f'2(e^-x)sin(x) = 0; f'1 cos(x) + f'2 sin(x) = 0
5. f'1(-(e^-x)sin(x)-(e^-x)cos(x)) + f'2((e^-x)cos(x)-(e^-x)sin(x)) =
(e^-x)2(tan^2(x)

The system of equations simplifies to:

f'1 cos (x) + f'2 sin(x) = 0
f'1(-sin(x)-cos(x)) + f'2(cos(x) - sin(x)) = 2(tan^2(x))

Then I used Cramer's Rule to solve for f'1 and f'2 which is:

f'1 = -2(tan^2(x)) * sin(x)

f'2 = 2(tan^2(x)) * cos(x)

But something is not right with this and I end up with a screwball answer. My yc is correct though. The answer in the back of the book is:

y=(e^-x)(c1cos(x) + c2sin(x) - 4 + 2sin(x)*ln(sec x + tan x))

I've worked through this 5 times and I keep getting the same answer. Any suggestions? Thanks a ton,

JN

2. Originally Posted by Jim Newt

f'1 = -2(tan^2(x)) * sin(x)

f'2 = 2(tan^2(x)) * cos(x)

But something is not right with this and I end up with a screwball answer. My yc is correct though. The answer in the back of the book is:

y=(e^-x)(c1cos(x) + c2sin(x) - 4 + 2sin(x)*ln(sec x + tan x))

I've worked through this 5 times and I keep getting the same answer. Any suggestions? Thanks a ton,

JN

Hello Jim,

First we need to compute some integrals

$-2\int \sin(x)\tan^2(x)dx$

First lets rewrite this interms of sine and cosine

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

Now by long division

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

Integrating we get (for the 2nd one let u =cos(x))

$-2\cos(x)-\sec(x)$

Now for the other integral we have

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

Using termwise division we get

$2\int (\sec(x)-\cos(x))dx=2\ln|\sec(x)+\tan(x)|-2\sin(x)$

The first integral should be memorized or from a table.
If you really want to do it by hand let u=sec(x)+tan(x) it is not too bad...

Now finally for the particular solution we have

$e^{-x}\cos(x)[-2\cos(x)-2\sec(x)]+e^{-x}\sin(x)[2\ln|\sec(x)+\tan(x)|-2\sin(x)]=$

$e^{-x}\{[-2\cos^2(x)-2]+[2\sin(x)\ln|\sec(x)+\tan(x)|-2\sin^2(x)]\}=$

$e^{-x}\{[-2\cos^2(x)-2\sin^2(x)-2+2\sin(x)\ln|\sec(x)+\tan(x)|\}=$

$e^{-x}\{[-2-2+2\sin(x)\ln|\sec(x)+\tan(x)|\}=e^{-x}\{[-4+2\sin(x)\ln|\sec(x)+\tan(x)|\}$

This is what we wanted YEAH!!!

Good luck.

3. Empty Set,

You have been a gigantic help. Thanks a ton!

JN