117k views
4 votes
Solution for dy/dx+xsin 2 y=x^3 cos^2y

User Greg Bray
by
7.7k points

1 Answer

4 votes
Rearrange the ODE as


(\mathrm dy)/(\mathrm dx)+x\sin2y=x^3\cos^2y

\sec^2y(\mathrm dy)/(\mathrm dx)+x\sin2y\sec^2y=x^3

Take
u=\tan y, so that
(\mathrm du)/(\mathrm dx)=\sec^2y(\mathrm dy)/(\mathrm dx).

Supposing that
|y|<\frac\pi2, we have
\tan^(-1)u=y, from which it follows that


\sin2y=2\sin y\cos y=2\frac u{√(u^2+1)}\frac1{√(u^2+1)}=(2u)/(u^2+1)

\sec^2y=1+\tan^2y=1+u^2

So we can write the ODE as


(\mathrm du)/(\mathrm dx)+2xu=x^3

which is linear in
u. Multiplying both sides by
e^(x^2), we have


e^(x^2)(\mathrm du)/(\mathrm dx)+2xe^(x^2)u=x^3e^(x^2)

(\mathrm d)/(\mathrm dx)\bigg[e^(x^2)u\bigg]=x^3e^(x^2)

Integrate both sides with respect to
x:


\displaystyle\int(\mathrm d)/(\mathrm dx)\bigg[e^(x^2)u\bigg]\,\mathrm dx=\int x^3e^(x^2)\,\mathrm dx

e^(x^2)u=\displaystyle\int x^3e^(x^2)\,\mathrm dx

Substitute
t=x^2, so that
\mathrm dt=2x\,\mathrm dx. Then


\displaystyle\int x^3e^(x^2)\,\mathrm dx=\frac12\int 2xx^2e^(x^2)\,\mathrm dx=\frac12\int te^t\,\mathrm dt

Integrate the right hand side by parts using


f=t\implies\mathrm df=\mathrm dt

\mathrm dg=e^t\,\mathrm dt\implies g=e^t

\displaystyle\frac12\int te^t\,\mathrm dt=\frac12\left(te^t-\int e^t\,\mathrm dt\right)

You should end up with


e^(x^2)u=\frac12e^(x^2)(x^2-1)+C

u=\frac{x^2-1}2+Ce^(-x^2)

\tan y=\frac{x^2-1}2+Ce^(-x^2)

and provided that we restrict
|y|<\frac\pi2, we can write


y=\tan^(-1)\left(\frac{x^2-1}2+Ce^(-x^2)\right)
User Rawley Fowler
by
7.6k points