7.7.25 problem 25

Internal problem ID [203]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Review problems at page 98
Problem number : 25
Date solved : Saturday, March 29, 2025 at 04:45:15 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=2*y(x)+(1+x)*diff(y(x),x) = 3*x+3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x +1+\frac {c_1}{\left (x +1\right )^{2}} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 25
ode=2*y[x]+(x+1)*D[y[x],x]==3*x+3; 
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.261 (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} \]