78.1.43 problem 4 (e)

Internal problem ID [18027]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 1. The Nature of Differential Equations. Separable Equations. Section 2. Problems at page 9
Problem number : 4 (e)
Date solved : Monday, March 31, 2025 at 04:57:10 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&={\mathrm e}^{x} \cos \left (x \right ) \end{align*}

With initial conditions

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

Maple. Time used: 0.028 (sec). Leaf size: 15
ode:=diff(y(x),x) = exp(x)*cos(x); 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {1}{2}+\frac {{\mathrm e}^{x} \left (\cos \left (x \right )+\sin \left (x \right )\right )}{2} \]
Mathematica. Time used: 0.015 (sec). Leaf size: 23
ode=D[y[x],x]==Exp[x]*Cos[x]; 
ic={y[0]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \left (e^x \sin (x)+e^x \cos (x)-1\right ) \]
Sympy. Time used: 0.149 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-exp(x)*cos(x) + Derivative(y(x), x),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e^{x} \sin {\left (x \right )}}{2} + \frac {e^{x} \cos {\left (x \right )}}{2} - \frac {1}{2} \]