74.7.34 problem 34

Internal problem ID [16040]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.5, page 64
Problem number : 34
Date solved : Monday, March 31, 2025 at 02:34:10 PM
CAS classification : [_Bernoulli]

\begin{align*} y^{\prime }-2 y&=t^{2} \sqrt {y} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1 \end{align*}

Maple. Time used: 0.100 (sec). Leaf size: 42
ode:=diff(y(t),t)-2*y(t) = t^2*y(t)^(1/2); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = 1+4 \,{\mathrm e}^{2 t}+2 \left (-t^{2}-2 t -2\right ) {\mathrm e}^{t}+\frac {t^{4}}{4}+t^{3}+2 t^{2}+2 t \]
Mathematica. Time used: 0.17 (sec). Leaf size: 71
ode=D[y[t],t]-2*y[t]==t^2*Sqrt[y[t]]; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to \frac {1}{4} e^{2 t} \left (\int _0^te^{-K[1]} K[1]^2dK[1]-2\right ){}^2 \\ y(t)\to \frac {1}{4} e^{2 t} \left (\int _0^te^{-K[1]} K[1]^2dK[1]+2\right ){}^2 \\ \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t**2*sqrt(y(t)) - 2*y(t) + Derivative(y(t), t),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants