79.1.5 problem 1 (v)

Internal problem ID [18421]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 3. Solutions of first-order equations. Exercises at page 47
Problem number : 1 (v)
Date solved : Monday, March 31, 2025 at 05:27:53 PM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.028 (sec). Leaf size: 11
ode:=diff(x(t),t) = cos(t); 
ic:=x(1) = 0; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x = \sin \left (t \right )-\sin \left (1\right ) \]
Mathematica. Time used: 0.004 (sec). Leaf size: 12
ode=D[x[t],t]==Cos[t]; 
ic={x[1]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \sin (t)-\sin (1) \]
Sympy. Time used: 0.051 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-cos(t) + Derivative(x(t), t),0) 
ics = {x(1): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \sin {\left (t \right )} - \sin {\left (1 \right )} \]