I was helping somebody on some math problems when a wild question appears. It goes like this:
Get the solution to the differential equation $$\cos y \sin2x dx +(\cos^2y - \cos^2x)dy = 0$$
My work
I was able to search the internet on how to get the solution to the differential equation shown above but I do not understand the way.
We could perhaps rearrange the above differential equation into the form
$$M(x,y)dx + N(x,y)dy = 0$$
With the form above, we could see if the given differential equation is variable-separable, homogenous or an exact-type.
Testing the given differential equation as variable-separable:
No. We can't. The differential equation above isn't variable-separable.
Testing the given differential equation as homogenous:
$F(x,y)$ is a homogenous function of degree $n$ in $x$ and $y$ provided $F(kx,ky)$ = $k^nF(x,y)$. For example, $x^2 + y^2$ and $x^2 \sin \left(\frac{y}{x}\right)$ are homogenous functions of degree $2$ in $x$ and $y$. With that in mind...
Looking at the first term $\cos y \sin2x$: $$F(x,y) = \cos y \sin2x$$ $$F(kx,ky) = \cos (ky) \sin(2kx)$$ Getting deeper, we conclude that $$F(kx,ky) \neq k^nF(x,y)$$
Looking at the second term $\cos^2y - \cos^2x$: $$F(x,y) = \cos^2y - \cos^2x$$ $$F(kx,ky) = \cos^2(ky) - \cos^2(kx)$$ Getting deeper, we conclude that $$F(kx,ky) \neq k^nF(x,y)$$
The terms themselves must be homogenous if the differential equations are homogenous.
No. We can't. The differential equation above isn't homogenous.
Testing the given differential equation if it is an exact-type:
A necessary condition for a differential equation to be exact is
$$\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}$$
So getting the expression for $\frac{\partial M}{\partial y}$:
$$\frac{\partial M}{\partial y} = \frac{\partial}{\partial y}(\cos y \sin2x) $$ $$\frac{\partial M}{\partial y} = \sin 2x\frac{\partial}{\partial y}(\cos y) $$ $$\frac{\partial M}{\partial y} = \sin 2x(-\sin y)$$ $$\frac{\partial M}{\partial y} = -\sin y \sin 2x$$
So getting the expression for $\frac{\partial N}{\partial x}$:
$$\frac{\partial N}{\partial x} = \frac{\partial}{\partial x}(\cos^2y - \cos^2x) $$ $$\frac{\partial N}{\partial x} = 0 - \frac{\partial}{\partial x}(\cos^2x) $$ $$\frac{\partial N}{\partial x} = 0 - \frac{\partial}{\partial x}\left(\frac{1}{2} + \frac{1}{2}\cos 2x\right) $$ $$\frac{\partial N}{\partial x} = \sin 2x $$
We see that $\frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}$, so the given differential equation isn't exact either.
Let's try converting it into linear differential equation.
Let's try rearranging the given differential equation above into a Bernoulli equation, having the form
$$\frac{dy}{dx} + P(x)y = Q(x)$$ Then...
$$\cos y \sin2x dx +(\cos^2y - \cos^2x)dy = 0$$ $$\frac{\cos y \sin2x dx}{dx} +\frac{(\cos^2y - \cos^2x)dy}{dx} = \frac{0}{dx}$$ $$\cos y \sin2x + (\cos^2y - \cos^2x)\frac{dy}{dx} = 0$$ $$\frac{\cos y \sin2x}{\cos^2y - \cos^2x} + \frac{\cos^2y - \cos^2x}{\cos^2y - \cos^2x}\frac{dy}{dx} = \frac{0}{\cos^2y - \cos^2x}$$ $$\frac{\cos y \sin2x}{\cos^2y - \cos^2x} + \frac{dy}{dx} = 0$$ $$\frac{dy}{dx} + \frac{\cos y \sin2x}{\cos^2y - \cos^2x} = 0$$
Screw that. We couldn't even discern what is the expression of $P(x)y$ because the expression $\frac{\cos y \sin2x}{\cos^2y - \cos^2x}$ is irreducible. We can't separate $x$'s from $y$'s.
How do we get the solution of the differential equation above?

Just a little hint
This is not a full solution ...
$$\cos(y)\sin(2x)x'=-\cos^2(y)+ {\cos^2(x)}$$ $$\sin(2x)x'=-\cos(y)+\frac {\cos^2(x)}{\cos(y)}$$ $$2\sin(x)\cos(x)x'=-\cos(y)+\frac {1-\sin^2(x)}{\cos(y)}$$ $$2\sin(x)\cos(x)x'+\frac {\sin^2(x)}{\cos(y)}=-\cos(y)+\frac {1}{\cos(y)}$$ $$2\sin(x)\cos(x)x'+\frac {\sin^2(x)}{\cos(y)}=f(y)$$ $$2\sin(x)(\sin(x))'+\frac {\sin^2(x)}{\cos(y)}=f(y)$$ Sustitute $h=\sin(x)$ for a better expression $$2hh'+\frac {h^2}{\cos(y)}=f(y)$$ $$(h^2)'+\frac {h^2}{\cos(y)}=f(y)$$ Substitute $g(y)=h^2(y)-1$ $$\boxed{g'(y)+\frac {g(y)}{\cos(y)}=-\cos(y)}$$
$$........$$ We have reduced the first equation to the canonical form of a first order linear equation. But it does not mean that it's easy to integrate such ode. Especially if it involves Gaussian like integrals...
Edit Maybe the ODE could be solved with $tan(x/2)$ susbtitution's formula... when I write $h=\sin(x)$ it means $h(y)=\sin(x(y))$ both x, and h are functions of the variable y.And so is g ( g(y)) too.