8.6.25 problem 25

Internal problem ID [795]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Chapter 1 review problems. Page 78
Problem number : 25
Date solved : Saturday, March 29, 2025 at 10:28:41 PM
CAS classification : [_linear]

\begin{align*} 2 y+\left (1+x \right ) y^{\prime }&=3+3 x \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=2*y(x)+(1+x)*diff(y(x),x) = 3+3*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1+x +\frac {c_1}{\left (1+x \right )^{2}} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 25
ode=2*y[x]+(1+x)*D[y[x],x] == 3+3*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^3+3 x^2+3 x+c_1}{(x+1)^2} \]
Sympy. Time used: 0.243 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x + (x + 1)*Derivative(y(x), x) + 2*y(x) - 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + x^{3} + 3 x^{2} + 3 x}{x^{2} + 2 x + 1} \]