2.31   ODE No. 31

  1. Problem in Latex
  2. Mathematica input
  3. Maple input

\[ y'(x)-a x^n \left (y(x)^2+1\right )=0 \] Mathematica : cpu = 0.13142 (sec), leaf count = 21

\[\left \{\left \{y(x)\to \tan \left (\frac {a x^{n+1}}{n+1}+c_1\right )\right \}\right \}\]

Maple : cpu = 0.06 (sec), leaf count = 23

\[ \left \{ y \left ( x \right ) =\tan \left ( {\frac { \left ( {x}^{n+1}+ \left ( n+1 \right ) {\it \_C1} \right ) a}{n+1}} \right ) \right \} \]

Hand solution

\begin {align} y^{\prime }-ax^{n}\left ( y^{2}+1\right ) & =0\nonumber \\ y^{\prime } & =ax^{n}+ax^{n}y^{2}\nonumber \\ & =P\left ( x\right ) +Q\left ( x\right ) y+R\left ( x\right ) y^{2}\tag {1} \end {align}

This is Ricatti first order non-linear ODE. \(P\left ( x\right ) =ax^{n},Q\left ( x\right ) =0,R\left ( x\right ) =ax^{n}\). But this is separable also. Hence\begin {align*} \frac {y^{\prime }}{\left ( y^{2}+1\right ) } & =ax^{n}\\ \frac {dy}{\left ( y^{2}+1\right ) } & =ax^{n}dx \end {align*}

Integrating\[ \arctan \left ( y\left ( x\right ) \right ) =a\frac {x^{n+1}}{n+1}+C \] Or\[ y\left ( x\right ) =\tan \left ( a\frac {x^{n+1}}{n+1}+C\right ) \]

Verification

restart; 
eq:=diff(y(x),x)-a*x^n*(y(x)^2+1) = 0; 
sol:=tan(a*x^(n+1)/(n+1)+_C1); 
odetest(y(x)=sol,eq); 
0