I tried this:

$$y'=-\frac{x\sin(y)+y\cos(y)}{x\cos(y)-y\sin(y)} = -\frac{\frac{x}{y}\tan(y)+1}{\frac{x}{y}-\tan(y)}$$

This looks like substitution to me, but I'm not sure what to substitute.

Any help is appreciated! Thanks.

  • $\begingroup$ try $$y(x)=u(x)x$$ $\endgroup$ – Dr. Sonnhard Graubner Jan 1 '18 at 14:08
  • $\begingroup$ I demonstrated down below a classic but strenuous way of solving such differential equations. $\endgroup$ – Rebellos Jan 1 '18 at 14:32

You need to find an integrating factor, such that your equation becomes exact. More specifically :

$$(x\sin(y)+y\cos(y))dx+(x\cos(y)-y\sin(y))dy=0 $$



Let :

$$R(x,y)= x\sin(y) + y\cos(y)$$ $$\text{and}$$ $$S(x,y)= x\cos(y) - y\sin(y)$$

This is not an exact equation, as mentioned above, because it is :

$$R_y(x,y)\neq S_x(x,y)$$

So, you need to find an integrating factor, such that :

$$\frac{d}{dy} \left( μ(x)R(x,y) \right)= \frac{d}{dx} \left( μ(x)S(x,y) \right)$$


$$(\cos(y) + x\cos(y)-y\sin(y))μ(x) = μ'(x)(x\cos(y) - y\sin(y)) + μ(x)\cos(y)$$


$$\frac{μ'(x)}{μ(x)}=1 \Rightarrow \ln(μ(x))=x \Leftrightarrow μ(x) = e^x$$

Check now, as we did initially, that the given equation is exact (I'll leave this to you).

Now, we need to define a function $f(x,y)$ such that :

$$f_x(x,y) = P(x,y)=e^x(x\sin(y) + y\cos(y))\quad\text{and} \quad f_y(x,y) = Q(x,y)=e^x(x\cos(y)-y\sin(y)+\cos(y))$$

Then, the solution will be given by $f(x,y)=c_1$ where $c_1$ is an arbitrary constant.

By integrating by respect to each variable, we get (I'll leave the analytic calculations of the integrations to you) :

$$\int f_x(x,y)dx = \dots = g(y) + e^x(y\cos(y) + (x-1)\sin(y)) $$

where $g(y)$ is an arbitrary function of $y$.

Let's differentiate $f(x,y)$ in order to find $g(y)$ :

$$\frac{\partial f}{\partial y}(x,y)=\dots = \frac{dg(y)}{dy} + e^x(\cos(y) + (x-1)\cos(y) - y\sin(y))$$

Substitute in $f_y(x,y) = Q(x,y)$ and after some calculations (which I'll also leave to you) , you'll get to :

$$\frac{dg(y)}{dy}=0 \Rightarrow g(y) = 0$$

which means that :

$$f(x,y) = e^x(y\cos(y) + (x-1)\sin(y))$$

and since we've assumed the solution to be of the form $f(x,y)=c_1$ then the solution $y(x)$ is given by :

$$e^x(y\cos(y(x)) + (x-1)\sin(y(x)))=c_1$$

Sorry for leaving a lot of calculations to the reader (you) but it was a long solution.

  • $\begingroup$ Sections 2.4 and 2.5 of this text to provide a suitable formulation of this method, in my opinion at least. $\endgroup$ – Jared Goguen Jan 1 '18 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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