43.2.6 problem 2

Internal problem ID [8882]
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 : 2
Date solved : Tuesday, September 30, 2025 at 05:58:53 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+i y&=x \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=diff(y(x),x)+I*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -i x +1+{\mathrm e}^{-i x} c_1 \]
Mathematica. Time used: 0.022 (sec). Leaf size: 34
ode=D[y[x],x]+I*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-i x} \left (\int _1^xe^{i K[1]} K[1]dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.076 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + complex(0, 1)*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x \operatorname {complex}{\left (0,1 \right )}} + \frac {x}{\operatorname {complex}{\left (0,1 \right )}} - \frac {1}{\operatorname {complex}^{2}{\left (0,1 \right )}} \]