7.3.30 problem 30

Internal problem ID [70]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.4 (separable equations). Problems at page 43
Problem number : 30
Date solved : Saturday, March 29, 2025 at 04:28:49 PM
CAS classification : [_quadrature]

\begin{align*} {y^{\prime }}^{2}&=4 y \end{align*}

With initial conditions

\begin{align*} y \left (a \right )&=b \end{align*}

Maple. Time used: 0.150 (sec). Leaf size: 53
ode:=diff(y(x),x)^2 = 4*y(x); 
ic:=y(a) = b; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= \left (-2 a +2 x \right ) \sqrt {b}+a^{2}-2 a x +x^{2}+b \\ y &= \left (2 a -2 x \right ) \sqrt {b}+a^{2}-2 a x +x^{2}+b \\ \end{align*}
Mathematica. Time used: 0.052 (sec). Leaf size: 33
ode=D[y[x],x]^2== 4*y[x]; 
ic={y[a]==b}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \left (a+\sqrt {b}-x\right )^2 \\ y(x)\to \left (-a+\sqrt {b}+x\right )^2 \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*y(x) + Derivative(y(x), x)**2,0) 
ics = {y(a): b} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants