ODE No. 88

\[ -c e^{-2 a x}-4 a y(x)-b+2 y'(x)-3 y(x)^2=0 \] Mathematica : cpu = 0.504185 (sec), leaf count = 2831

DSolve[-b - c/E^(2*a*x) - 4*a*y[x] - 3*y[x]^2 + 2*Derivative[1][y][x] == 0,y[x],x]
 

\[\left \{\left \{y(x)\to -\frac {2 \left (-2^{-\frac {a \sqrt {4 a^2-3 b}-2 a^2}{a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{a^2}+1} 3^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} a^{-\frac {a \sqrt {4 a^2-3 b}-2 a^2}{2 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}+1} b^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-1} \left (\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}\right ) c^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} e^{-2 a x} J_{\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right ) \Gamma \left (\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}+1\right ) \left (\frac {e^{-2 a x}}{b}\right )^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-1}-2^{-\frac {a \sqrt {4 a^2-3 b}-2 a^2}{a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{a^2}-2} 3^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}+\frac {1}{2}} a^{\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}-\frac {a \sqrt {4 a^2-3 b}-2 a^2}{2 a^2}} b^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-\frac {1}{2}} c^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}+\frac {1}{2}} e^{-2 a x} \left (J_{\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}-1}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right )-J_{\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}+1}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right )\right ) \Gamma \left (\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}+1\right ) \left (\frac {e^{-2 a x}}{b}\right )^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-\frac {1}{2}}+c_1 \left (-2^{-\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{a^2}-2} 3^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}+\frac {1}{2}} b^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-\frac {1}{2}} c^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}+\frac {1}{2}} e^{-2 a x} \left (\frac {e^{-2 a x}}{b}\right )^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-\frac {1}{2}} \left (J_{-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}-1}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right )-J_{1-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right )\right ) \Gamma \left (1-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}\right ) a^{-\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{2 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}}-2^{-\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{a^2}+1} 3^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} b^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-1} \left (\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}\right ) c^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} e^{-2 a x} \left (\frac {e^{-2 a x}}{b}\right )^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}-1} J_{-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right ) \Gamma \left (1-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}\right ) a^{-\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{2 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}+1}\right )\right )}{3 \left (2^{-\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{a^2}} 3^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} b^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} c^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} \left (\frac {e^{-2 a x}}{b}\right )^{\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{4 a^2}+\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} J_{-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right ) c_1 \Gamma \left (1-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}\right ) a^{-\frac {-2 a^2-\sqrt {4 a^2-3 b} a}{2 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}}+2^{\frac {\sqrt {4 a^4-3 a^2 b}}{a^2}-\frac {a \sqrt {4 a^2-3 b}-2 a^2}{a^2}} 3^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} b^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} c^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} \left (\frac {e^{-2 a x}}{b}\right )^{\frac {a \sqrt {4 a^2-3 b}-2 a^2}{4 a^2}-\frac {\sqrt {4 a^4-3 a^2 b}}{4 a^2}} J_{\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}}\left (\frac {\sqrt {3} \sqrt {b} \sqrt {c} \sqrt {\frac {e^{-2 a x}}{b}}}{2 a}\right ) \Gamma \left (\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}+1\right ) a^{\frac {\sqrt {4 a^4-3 a^2 b}}{2 a^2}-\frac {a \sqrt {4 a^2-3 b}-2 a^2}{2 a^2}}\right )}\right \}\right \}\] Maple : cpu = 0.252 (sec), leaf count = 256

dsolve(2*diff(y(x),x)-3*y(x)^2-4*a*y(x)-b-c*exp(-2*a*x) = 0,y(x))
 

\[y \left (x \right ) = \frac {-\sqrt {3}\, {\mathrm e}^{-a x} \left (\BesselY \left (-\frac {\sqrt {4 a^{2}-3 b}-2 a}{2 a}, \frac {\sqrt {3}\, \sqrt {c}\, {\mathrm e}^{-a x}}{2 a}\right ) c_{1}+\BesselJ \left (-\frac {\sqrt {4 a^{2}-3 b}-2 a}{2 a}, \frac {\sqrt {3}\, \sqrt {c}\, {\mathrm e}^{-a x}}{2 a}\right )\right ) \sqrt {c}-\left (\sqrt {4 a^{2}-3 b}+2 a \right ) \left (\BesselY \left (-\frac {\sqrt {4 a^{2}-3 b}}{2 a}, \frac {\sqrt {3}\, \sqrt {c}\, {\mathrm e}^{-a x}}{2 a}\right ) c_{1}+\BesselJ \left (-\frac {\sqrt {4 a^{2}-3 b}}{2 a}, \frac {\sqrt {3}\, \sqrt {c}\, {\mathrm e}^{-a x}}{2 a}\right )\right )}{3 \BesselY \left (-\frac {\sqrt {4 a^{2}-3 b}}{2 a}, \frac {\sqrt {3}\, \sqrt {c}\, {\mathrm e}^{-a x}}{2 a}\right ) c_{1}+3 \BesselJ \left (-\frac {\sqrt {4 a^{2}-3 b}}{2 a}, \frac {\sqrt {3}\, \sqrt {c}\, {\mathrm e}^{-a x}}{2 a}\right )}\]

Hand solution

\[ y^{\prime }=\frac {1}{2}b+\frac {1}{2}ce^{-2ax}+2ay+\frac {3}{2}y^{2}\]

This is of the form \(y^{\prime }=f_{0}+f_{1}y+f_{2}y^{2}\) with \(f_{0}=\frac {1}{2}b+\frac {1}{2}ce^{-2ax},f_{1}=2a,f_{3}=\frac {3}{2}\). Hence it is Riccati non-linear first order. Transforming to second order ODE using \begin {align*} y & =-\frac {u^{\prime }}{uf_{2}}\\ & =\frac {-2}{3}\frac {u^{\prime }}{u} \end {align*}

Hence \(y^{\prime }=\frac {-2}{3}\left ( \frac {u^{\prime \prime }}{u}-\frac {\left ( u^{\prime }\right ) ^{2}}{u^{2}}\right ) \) and equating this to RHS of the ODE gives

\begin {align*} \frac {-2}{3}\left ( \frac {u^{\prime \prime }}{u}-\frac {\left ( u^{\prime }\right ) ^{2}}{u^{2}}\right ) & =\frac {1}{2}b+\frac {1}{2}ce^{-2ax}+2a\left ( \frac {-2}{3}\frac {u^{\prime }}{u}\right ) +\frac {3}{2}\left ( \frac {-2}{3}\frac {u^{\prime }}{u}\right ) ^{2}\\ \frac {-2}{3}\frac {u^{\prime \prime }}{u}+\frac {2}{3}\frac {\left ( u^{\prime }\right ) ^{2}}{u^{2}} & =\frac {1}{2}b+\frac {1}{2}ce^{-2ax}-\frac {4}{3}a\frac {u^{\prime }}{u}+\frac {2}{3}\frac {\left ( u^{\prime }\right ) ^{2}}{u^{2}}\\ \frac {-2}{3}\frac {u^{\prime \prime }}{u} & =\frac {1}{2}b+\frac {1}{2}ce^{-2ax}-\frac {4}{3}a\frac {u^{\prime }}{u}\\ \frac {u^{\prime \prime }}{u} & =-\frac {3}{4}b-\frac {3}{4}ce^{-2ax}+2a\frac {u^{\prime }}{u}\\ u^{\prime \prime } & =-\left ( \frac {3}{4}b+\frac {3}{4}ce^{-2ax}\right ) u+2au^{\prime }\\ u^{\prime \prime }-2au^{\prime }+\frac {3}{4}\left ( b+ce^{-2ax}\right ) u & =0 \end {align*}

This is second order linear ODE with varying coefficient. Solved using power series method giving solutions using special functions (Bessel functions). Let \(A=\frac {\sqrt {4a^{2}-3b}}{a},B=\frac {\sqrt {3c}e^{-ax}}{a}\) then

\[ u\left ( x\right ) =C_{1}e^{ax}\operatorname {BesselJ}\left ( -\frac {1}{2}\frac {\sqrt {4a^{2}-3b}}{a},\frac {1}{2}\frac {\sqrt {3c}e^{-ax}}{a}\right ) +C_{2}e^{ax}\operatorname {BesselY}\left ( -\frac {1}{2}\frac {\sqrt {4a^{2}-3b}}{a},\frac {1}{2}\frac {\sqrt {3c}e^{-ax}}{a}\right ) \]

But

\begin {multline*} u^{\prime }\left ( x\right ) =C_{1}\,a\exp \left ( ax\right ) \operatorname {BesselJ}{\left ( -1/2\,{\frac {\sqrt {4\,{a}^{2}-3\,b}}{a},}1/2\,{\frac {\sqrt {3}\sqrt {c}\exp \left ( -ax\right ) }{a}}\right ) }\\ -1/2\,C_{1}\exp \left ( ax\right ) \left ( -\operatorname {BesselJ}{\left ( -1/2\,{\frac {\sqrt {4\,{a}^{2}-3\,b}}{a}}+1,1/2\,{\frac {\sqrt {3}\sqrt {c}\exp \left ( -ax\right ) }{a}}\right ) }-1/3\,{\frac {\sqrt {3}\sqrt {4\,{a}^{2}-3\,b}}{\sqrt {c}\exp \left ( -ax\right ) }\operatorname {BesselJ}{\left ( -1/2\,{\frac {\sqrt {4\,{a}^{2}-3\,b}}{a},}1/2\,{\frac {\sqrt {3}\sqrt {c}{\mathrm {e}^{-ax}}}{a}}\right ) }}\right ) \sqrt {3}\sqrt {c}\exp \left ( -ax\right ) \\ +C_{2}\,a\exp \left ( ax\right ) \operatorname {BesselY}{\left ( -1/2\,{\frac {\sqrt {4\,{a}^{2}-3\,b}}{a},}1/2\,{\frac {\sqrt {3}\sqrt {c}\exp \left ( -ax\right ) }{a}}\right ) }\\ -1/2\,C_{1}\,\exp \left ( ax\right ) \left ( -\operatorname {BesselY}{\left ( -1/2\,{\frac {\sqrt {4\,{a}^{2}-3\,b}}{a}}+1,1/2\,{\frac {\sqrt {3}\sqrt {c}\exp \left ( -ax\right ) }{a}}\right ) }-1/3\,{\frac {\sqrt {3}\sqrt {4\,{a}^{2}-3\,b}}{\sqrt {c}\exp \left ( -ax\right ) }\operatorname {BesselY}{\left ( -1/2\,{\frac {\sqrt {4\,{a}^{2}-3\,b}}{a},}1/2\,{\frac {\sqrt {3}\sqrt {c}{\mathrm {e}^{-ax}}}{a}}\right ) }}\right ) \sqrt {3}\sqrt {c}{\mathrm {e}^{-ax}} \end {multline*}

Hence from \(y=\frac {-2}{3}\frac {u^{\prime }}{u}\) the solution is now found.

Verification

ode:=2*diff(y(x),x)-3*y(x)^2-4*a*y(x)=b+c*exp(-2*a*x); 
uode:=diff(u(x),x$2)-2*a*diff(u(x),x)+3/4*(b+c*(exp(-2*a*x)))*u(x)=0; 
uSol:=dsolve(uode,u(x)); 
my_sol:=(-2/3)*diff(rhs(uSol),x)/rhs(uSol); 
odetest(y(x)=my_sol,ode); 
0