49.2.2 problem 1(b)

Internal problem ID [7592]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 1.6 Introduction– Linear equations of First Order. Page 41
Problem number : 1(b)
Date solved : Wednesday, March 05, 2025 at 04:47:19 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+y&={\mathrm e}^{x} \end{align*}

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