# Stuck on solving a differential equation

Question:

Solve the following differential equation: $$\cos x dy = y(\sin x -y) dx$$

I simplified it down to: $$\frac{dy}{dx} = y\tan x - y^2\sec x$$

Not sure how I should proceed from here though. Any hints?

This is a Bernoulli equation.

$$y'=f(x)y+g(x)y^\alpha$$

Use $u=y^{1-\alpha}$ as substitution to reduce your problem to a linear ODE.

$$u'=(1-\alpha)(f(x)u+g(x))$$

• Aha.... I see now. However, is there any other way to solve the problem? – Gummy bears Sep 16 '15 at 11:52
• Yes there are but they are more general=harder to understand. – MrYouMath Sep 16 '15 at 11:53
• The thing is I haven't been taught this.... So I'm not sure that this is the way that I should solve it. – Gummy bears Sep 16 '15 at 11:54
• there might be other ways, but this is the quickest way to solve this. Maybe your teacher didn't select this equation properly. – MrYouMath Sep 16 '15 at 11:56
• Ahh... might be. Thanks anyways. I guess it's good to learn new things. So after it becomes a linear ODE, we solve it the normal way, right? – Gummy bears Sep 16 '15 at 11:57

HINT:

Notice, $$\frac{dy}{dx}=y\tan x-y^2\sec x\iff \frac{dy}{dx}-y\tan x=-y^2\sec x$$

$$-\frac{1}{y^2}\frac{dy}{dx}+\frac{1}{y}\tan x=\sec x$$

Let $\frac{1}{y}=u\implies \frac{-1}{y^2}\frac{dy}{dx}=\frac{du}{dx}$, by substitution we get $$\color{red}{\frac{du}{dx}+u\tan x=\sec x}$$ I hope you can solve the above equation in Bernoulli's D.E. form.

• Yeah that becomes a linear equation. That's the method I was looking for. – Gummy bears Sep 16 '15 at 12:09

Solution without $\bf{Bernoulli}$ Substution::

Given $$\cos xdy = y(\sin x-y)dx = y\sin xdx-y^2dx$$

So $$\displaystyle \cos xdy-y\sin xdx = -y^2 dx\Rightarrow \frac{\cos xdy-y\sin xdx}{y^2\cos^2 x} = -\frac{1}{\cos^2 x}dx$$

So we get $$\displaystyle d\left(\frac{1}{y\cos x}\right) = - \sec^2 xdx$$

$$\displaystyle \int \frac{d}{dx}\left(\frac{1}{y\cos x}\right)dx = - \int \sec^2 xdx$$

So we get $$\displaystyle \frac{1}{y\cos x} = -\tan x+\mathcal{C}$$

Hint: This is Bernoulli type ODE. To solve it, you need to make the change $z(x)=y(x)^{1-2}=\frac{1}{y(x)}$

• Sorry but neither of those names help.... – Gummy bears Sep 16 '15 at 11:49
• I edited my answer. – Svetoslav Sep 16 '15 at 11:50
• Yeah...... What just happened? This is not something that I've been taught... at least not that I remember. – Gummy bears Sep 16 '15 at 11:50