49.5.3 problem 1(c)

Internal problem ID [7627]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 2. Linear equations with constant coefficients. Page 59
Problem number : 1(c)
Date solved : Sunday, March 30, 2025 at 12:17:33 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+\left (-1+3 i\right ) y^{\prime }-3 i y&=0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=2\\ y^{\prime }\left (0\right )&=0 \end{align*}

Maple. Time used: 0.053 (sec). Leaf size: 15
ode:=diff(diff(y(x),x),x)+(-1+3*I)*diff(y(x),x)-3*I*y(x) = 0; 
ic:=y(0) = 2, D(y)(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \left (\frac {9}{5}+\frac {3 i}{5}\right ) {\mathrm e}^{x}+\left (\frac {1}{5}-\frac {3 i}{5}\right ) {\mathrm e}^{-3 i x} \]
Mathematica. Time used: 0.014 (sec). Leaf size: 31
ode=D[y[x],{x,2}]+(3*I-1)*D[y[x],x]-3*I*y[x]==0; 
ic={y[0]==2,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{5} e^{-3 i x} \left ((9+3 i) e^{(1+3 i) x}+(1-3 i)\right ) \]
Sympy. Time used: 0.367 (sec). Leaf size: 134
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(complex(-1, 3)*Derivative(y(x), x) + complex(0, -3)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 2, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\left (\sqrt {\operatorname {complex}^{2}{\left (-1,3 \right )} - 4 \operatorname {complex}{\left (0,-3 \right )}} - \operatorname {complex}{\left (-1,3 \right )}\right ) e^{- \frac {x \left (\sqrt {\operatorname {complex}^{2}{\left (-1,3 \right )} - 4 \operatorname {complex}{\left (0,-3 \right )}} + \operatorname {complex}{\left (-1,3 \right )}\right )}{2}}}{\sqrt {\operatorname {complex}^{2}{\left (-1,3 \right )} - 4 \operatorname {complex}{\left (0,-3 \right )}}} + \frac {\left (\sqrt {\operatorname {complex}^{2}{\left (-1,3 \right )} - 4 \operatorname {complex}{\left (0,-3 \right )}} + \operatorname {complex}{\left (-1,3 \right )}\right ) e^{\frac {x \left (\sqrt {\operatorname {complex}^{2}{\left (-1,3 \right )} - 4 \operatorname {complex}{\left (0,-3 \right )}} - \operatorname {complex}{\left (-1,3 \right )}\right )}{2}}}{\sqrt {\operatorname {complex}^{2}{\left (-1,3 \right )} - 4 \operatorname {complex}{\left (0,-3 \right )}}} \]