Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|cite|improve this question
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
up vote 4 down vote accepted

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)$$


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$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.