47.2.30 problem 30

Internal problem ID [7446]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 30
Date solved : Sunday, March 30, 2025 at 12:07:01 PM
CAS classification : [_linear]

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

With initial conditions

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

Maple. Time used: 0.045 (sec). Leaf size: 13
ode:=x*diff(y(x),x) = x+1/2*y(x); 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 2 x +\sqrt {x}\, c_1 \]
Mathematica. Time used: 0.046 (sec). Leaf size: 17
ode=x*D[y[x],x]==x+1/2*y[x]; 
ic={y[0]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 x+c_1 \sqrt {x} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - x - y(x)/2,0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions