2.4.6 problem 6

Internal problem ID [709]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.5. Linear first order equations. Page 56
Problem number : 6
Date solved : Tuesday, September 30, 2025 at 04:06:45 AM
CAS classification : [_linear]

\begin{align*} y+2 x y^{\prime }&=10 \sqrt {x} \end{align*}

With initial conditions

\begin{align*} y \left (2\right )&=5 \\ \end{align*}
Maple. Time used: 0.017 (sec). Leaf size: 15
ode:=y(x)+2*x*diff(y(x),x) = 10*x^(1/2); 
ic:=[y(2) = 5]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {-10+5 \sqrt {2}+5 x}{\sqrt {x}} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 20
ode=y[x]+2*x*D[y[x],x]== 10*x^(1/2); 
ic=y[2]==5; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {5 \left (x+\sqrt {2}-2\right )}{\sqrt {x}} \end{align*}
Sympy. Time used: 0.115 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-10*sqrt(x) + 2*x*Derivative(y(x), x) + y(x),0) 
ics = {y(2): 5} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {5 x - 10 + 5 \sqrt {2}}{\sqrt {x}} \]