# solving differential equation: $y''-2y'\tan x=\frac{1}{\cos^3x}$

I'd really love your help with solving we following differential equation $$y''-2y'\tan x=\frac{1}{\cos^3x}.$$

First I tried to do it with $z=y'$ but it's just impossible,$z$ is a big and not nice expression, and to integrate it would be very hard problem. Then I though of Euler equations, but it's not in the correct form for doing it.

What should I do?

Thanks a lot!

-
Can you solve the homogenous equation (the same LHS equals $0$)? –  Did Jul 1 '12 at 7:47
Correct. That's what I get, but then $z= \ln (\frac{\sin(t/2)+\cos(t/2)}{\cos(t/2) -\sin(t/2)}) \cdot \cos^{-2}t +c_1 \cdot \cos^{-2}t$ Integrate this is a difficult job. –  Jozef Jul 1 '12 at 7:52
Every detail on this step should be included in your post. –  Did Jul 1 '12 at 8:04
@Jozef Yes, it is a difficult job, but it can be done. By the way, WolframAlpha solves the equation exactly like that. –  Siminore Jul 1 '12 at 8:18
@Siminore: so? and yes, I find it very difficult in a test to integrate $z$. –  Jozef Jul 1 '12 at 8:24

I'm not sure it's as hard as you're making it out to be. First, let's find an integrating factor. We want

$$py''-2py'\tan x=(py')'$$

$$-2p\tan x=p'$$

$$\frac p{p'}=-2\frac{\sin x}{\cos x}$$

$$\ln p=2\ln(\cos x)=\ln(\cos^2x)$$

$$p=\cos^2x$$

Multiplying through by our integrating factor, we get

$$y''\cos^2x-2y'\sin x\cos x=(y'\cos^2x)'=\sec x$$

$$y'\cos^2x=\ln(\sec x+\tan x)+C$$

$$y'=\sec^2x\ln(\sec x+\tan x)+C\sec^2x$$

$$y=\int\sec^2x\ln(\sec x+\tan x)dx+C\int\sec^2xdx$$

The second part is simply $C\tan x$. For the first integral, we'll use integration by parts. Obviously, we want that logarithm to go away, so that's the part we'll take the derivative of.

$$u=\ln(\sec x+\tan x),du=\sec x$$

$$dv=\sec^2xdx,v=\tan x$$

$$\int\sec^2x\ln(\sec x+\tan x)dx=\tan x\ln(\sec x +\tan x)-\int\sec x\tan xdx=$$

$$\tan x\ln(\sec x+\tan x)-\sec x$$

Putting everything together, we have

$$y=\tan x\ln(\sec x+\tan x)-\sec x+k_1\tan x+k_2$$

-