# Find the general solution of this nonlinear ODE: xy' + sin(2y) = x^3*sin^2(y)

## Homework Statement:

Find the general solution of:

xy' + sin(2y) = x^3*sin^2(y)

## Relevant Equations:

All math.
This equation, is non linear, non-separable, and weird. I would like to have a direction to start working on this.
I tried writing sin(2y) = 2sin(y)*cos(y).
See,
##xy' = x^3sin^2(y)-2sin(y)cos(y)##

Can't separate.

Writing in this way:
##(x^3sin^2y-sin2y)dx-xdy=0##

Also, I checked that it is not exact.
So, what next should I try?

• Delta2

Related Calculus and Beyond Homework Help News on Phys.org
fresh_42
Mentor

No. I don't see how that helps...

##x\frac{dy}{dx}+\frac{d(sin^2y)}{dy}=x^3sin^2y##

I can hardly take the LCM of dy and dx...

fresh_42
Mentor
No. I don't see how that helps...

##x\frac{dy}{dx}+\frac{d(sin^2y)}{dy}=x^3sin^2y##

I can hardly take the LCM of dy and dx...
Yes, it's quite tricky. I looked up the solution and the only other idea that gave me is to try a Weierstrass substitution:
https://en.wikipedia.org/wiki/Weierstrass_substitution

Your d.e. is non-linear and not amenable to analytic integration. I think you have two options:
a.) Solve it by numerical integration which could be quite tricky considering the non-linearities involved.
b.) Assume there was a misprint in the problem statement (it happens), and solve the equation:$$xy' + \sin(2x) = x^3\sin^2(x)$$
Option a.) makes sense if you are in a numerical methods class. Option b.) makes sense if you are in an introductory class for differential equations and the instructor has sloppy handwriting.

• Delta2
fresh_42
Mentor
Your d.e. is non-linear and not amenable to analytic integration. I think you have two options:
a.) Solve it by numerical integration which could be quite tricky considering the non-linearities involved.
b.) Assume there was a misprint in the problem statement (it happens), and solve the equation:$$xy' + \sin(2x) = x^3\sin^2(x)$$
Option a.) makes sense if you are in a numerical methods class. Option b.) makes sense if you are in an introductory class for differential equations and the instructor has sloppy handwriting.
WolframAlpha had a closed analytic solution. But I don't have the pro version to look up the steps. However, it looks as if Weierstraß could help. Otherwise there is still the option to simply proof that the solution is one by differentiation.

The question was from a daily assignment for a competitive exam. I'm not supposed to do it numerically. But it has a very high probability that there was some typing mistake...(since I'm supposed to be able to solve this question under 4 minutes..)

Also, I've never used Weierstrass substitution...

fresh_42
Mentor
(since I'm supposed to be able to solve this question under 4 minutes..)
Do you know the derivative of ##\operatorname{arccot}## by heart?

Yes. I keep getting such integrals to solve, so I need to memorize some of these basic tables by heart.

fresh_42
Mentor
The solution is ##-\operatorname{arccot}p(x)## with a polynomial in ##x##. So differentiate and see what you can find out about ##p##.

• Kaguro and Delta2
Given, y= -arccot(p)
##y' = \frac{p'}{1+p^2}##
##sin(2x) = 2sinxcosx=\frac{2sinx/cosx}{1/cos^2 (x)} =\frac{2tanx}{sec^2 (x)}= \frac{2tanx}{1+tan^2 (x)}##
sin(-2arccot(p)) =-2p/(1+p^2)

similarly, sin^2(x) = tan^2(x)/(1+tan^2(x))
sin^2(-arccotp) = 1/(1+p^2)
So, finally:
##\frac{xp'}{1+p^2} - \frac{2p}{1+p^2} = \frac{x^3}{1+p^2}##
##xp' - 2p = x^3##
##p' - 2p/x = x^2##

Which I solved by integrating factor as 1/x^2.
p = x^3 + Cx^2

Is this ok?
And how on earth did you find the form of the solution?

fresh_42
Mentor
Looks good.
I used an internet tool to look up the solution:
https://www.wolframalpha.com/input/?i=xy'=x^3+sin^2(y)+-+2+sin(y)+cos(y)

But that was why I thought the Weierstraß- or half-tangent substitution could help. It is generally a good idea if terms in ##x## and trigonometric functions in ##x## occur, because it turns trig functions into polynomials:
https://de.wikipedia.org/wiki/Weierstraß-Substitution#Beschreibung_der_Substitution
is easier to read than the English version. You only need to look at the formulas.

• Kaguro
vela
Staff Emeritus
Homework Helper
If you divide the original differential equation by ##\sin^2 y##, you get
$$x y' \csc^2 y = x^3 - \frac{2 \sin y \cos y}{\sin^2 y}.$$ Note that ##y' \csc^2 y = -(\cot y)'##. Now you have a first-order differential equation in ##\cot y##.

• fresh_42 and Kaguro
If you divide the original differential equation by ##\sin^2 y##, you get
$$x y' \csc^2 y = x^3 - \frac{2 \sin y \cos y}{\sin^2 y}.$$ Note that ##y' \csc^2 y = -(\cot y)'##. Now you have a first-order differential equation in ##\cot y##.
Oh! So that's how one gets the idea to use a trial solution of arccot!

That's great!

You guys are so powerful, manipulating equation in ways unimaginable by me...