# First-order nonlinear ordinary differential equation.

I have problem with one equation, can someone help me with it? Thanks a lot! Here it is:

$$\dfrac{\tan(y)}{\cos^2(y)}y'+\dfrac{\tan(x)}{\cos^2(x)}=0$$

Have a nice day/night!

• Is y a function of x, g, or t? Commented Nov 26, 2019 at 21:31
• Hello. There's y(x) prob.
– Joe
Commented Nov 26, 2019 at 21:33
• Joe it's a derivative on the left You can rewrite it Commented Nov 26, 2019 at 21:37

This is a separable equation. We have $$\frac{\tan y}{\cos^2y}\frac{\mathrm{d}y}{\mathrm{d}x}=-\frac{\tan x}{\cos^2x}$$ or \begin{align} \frac{\tan y}{\cos^2y}\mathrm{d}y&=-\frac{\tan x}{\cos^2x}\mathrm{d}x\\ \int\frac{\tan y}{\cos^2y}\mathrm{d}y&=-\int\frac{\tan x}{\cos^2x}\mathrm{d}x \end{align} Can you continue from here?

EDIT: Here is the solution, as requested. \begin{align} \int\frac{\tan x}{\cos^2x}\mathrm{d}x&= \int\frac{\sin x}{\cos^3x}\mathrm{d}x \\ &=-\int\frac{\mathrm{d}u}{u^3}\\ &=\frac{1}{2}\sec^2x+C\\ \frac{1}{2}\sec^2y&=-\frac{1}{2}\sec^2x+C\\ \cos^2x&=-\cos^2y+C\cos^2x\cos^2y \\ \cos^2y&=\frac{\cos^2x}{C\cos^2x-1} \\ y&=\arccos\left(\sqrt{\frac{\cos^2x}{C\cos^2x-1}}\right) \end{align}

• That was my first idea, but then I have sth like: $y=\sqrt(arccos(cos^2x+c))$ Is it correct?
– Joe
Commented Nov 26, 2019 at 21:45
• If the OP uses $\tan(x)$ to denote the tangent, please do not switch notations in your answer. Commented Nov 26, 2019 at 21:54
• @Adrain Keister he just changed it, he originally used $tg(x)$. I have edited my answer. Commented Nov 26, 2019 at 21:55
• @Joe I did not get that. Commented Nov 26, 2019 at 21:59
• I'm new, I don't know how I chaned it, but it's true, first time I used tg(x).
– Joe
Commented Nov 26, 2019 at 22:02

Another hint: $$\dfrac{\tan(y)}{\cos^2(y)}y'=\frac 1 2(\tan^2(y))'$$ And also : $$\dfrac{\tan(x)}{\cos^2(x)}=\frac 1 2 (\tan^2(x))'$$

Thx for answers. I have sth like: $$y=\sqrt{arccos(-cos2x+c)}$$. Is it correct?

• I don't think so; I added an edit to my answer. Check it out. Commented Nov 27, 2019 at 0:48