34.1.5 problem 5

Internal problem ID [6029]
Book : A treatise on ordinary and partial differential equations by William Woolsey Johnson. 1913
Section : Chapter 1, Nature and meaning of a differential equation between two variables. page 12
Problem number : 5
Date solved : Sunday, March 30, 2025 at 10:32:49 AM
CAS classification : [[_linear, `class A`]]

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

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