# Can't seem to solve this differential equation

Disclaimer: This IS homework. So I will outline the steps I've taken an where I'm stuck.

I have the following DE:

$$xy' = y + x\cos^2\left(\frac{y}{x}\right)$$

I then rule out the possible methods of solving it:

• Not separable
• Not homogeneous
• Not exact
• Possible integrating factor in $x$? No.
• Possible integrating factor in $y$? No.
• Not linear

Above are the only ways I have learned to solve DEs. To help, I've rewritten the DE in this form:

$$M(x,y)dx + N(x,y)dy = 0$$ $$\left(y + x\cos^2\left(\frac{y}{x}\right)\right)dx - xdy =0$$ $$M_{y} = 1 - 2\cos\left(\frac{y}{x}\right)\sin\left(\frac{y}{x}\right)$$ $$N_{x} = -1$$

I'm completely lost now. I can't seem to find any integrating factors (the $\frac{y}{x}$) inside the trigs are making it so that I can't get things only in terms of $x$ or $y$.

-
Instead of «can't seem» in your title you probably mean «don't seem»... In any case, it is usually best to be generous to the non native English speakers and write out things :) – Mariano Suárez-Alvarez Jan 20 '12 at 6:56
Why do you say the equation is not homogeneous? – Mariano Suárez-Alvarez Jan 20 '12 at 6:56
Hint: rewrite this as a differential equation involving the function $z:x\mapsto y(x)/x$. (+1 for showing what you tried.) – Did Jan 20 '12 at 6:58
@MarianoSuárez-Alvarez: Maybe I misunderstand how to count the powers. In the $M(x,y)$ and $N(x,y)$ form of the equation, I see the power of $y$ to be 1, the power of $xcos^2(y/x)$ to be 3 and the degree of $-x$ to be 1. Is that wrong? – n0pe Jan 20 '12 at 6:59
A useful definition of homogeneous is: rewrite the equation in the form $y'=F(x,y)$ for some function $F$. Then the equation is homogeneous if for all (non-zero...) scalars $\lambda$ we have $F(\lambda x,\lambda y)=F(x,y)$. – Mariano Suárez-Alvarez Jan 20 '12 at 7:09

Dividing both sides by $x$, we get $$\tag{1}y' =\frac{y}{x} + \cos^2(\frac{y}{x}).$$ If we let $u=\displaystyle\frac{y}{x}$, then we have $y=ux$ and $$\frac{dy}{dx}=x\frac{du}{dx}+u.$$ Substitute this into $(1)$, we have $$x\frac{du}{dx}+u=u+\cos^2(u).$$ I think you can solve it starting from here.
@MaxMackie: After the $u$ on both sides cancel, you can solve it by separable of variables, which you have learned I believed. – Paul Jan 20 '12 at 7:13
$$y=x\arctan(kln(x))$$ k=const.