43.2.5 problem 1(e)

Internal problem ID [8881]
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(e)
Date solved : Tuesday, September 30, 2025 at 05:58:18 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+3 y&={\mathrm e}^{i x} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=diff(y(x),x)+3*y(x) = exp(I*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-3 x} c_1 +\left (\frac {3}{10}-\frac {i}{10}\right ) {\mathrm e}^{i x} \]
Mathematica. Time used: 0.035 (sec). Leaf size: 29
ode=D[y[x],x]+3*y[x]==Exp[I*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (\frac {3}{10}-\frac {i}{10}\right ) e^{i x}+c_1 e^{-3 x} \end{align*}
Sympy. Time used: 0.090 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*y(x) - exp(x*complex(0, 1)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 3 x} + \frac {e^{x \operatorname {complex}{\left (0,1 \right )}}}{\operatorname {complex}{\left (0,1 \right )} + 3} \]