29.15.30 problem 438

Internal problem ID [5036]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 438
Date solved : Sunday, March 30, 2025 at 06:31:25 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} 1-y^{\prime }&=x +y \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=1-diff(y(x),x) = x+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x +2+{\mathrm e}^{-x} c_1 \]
Mathematica. Time used: 0.038 (sec). Leaf size: 18
ode=1-D[y[x],x]==x+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x+c_1 e^{-x}+2 \]
Sympy. Time used: 0.143 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x - y(x) - Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} - x + 2 \]