15.18.1 problem 1

Internal problem ID [3244]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 35, page 157
Problem number : 1
Date solved : Sunday, March 30, 2025 at 01:23:42 AM
CAS classification : [[_2nd_order, _quadrature]]

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

Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(diff(y(t),t),t) = cos(t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = -\cos \left (t \right )+c_1 t +c_2 \]
Mathematica. Time used: 0.005 (sec). Leaf size: 16
ode=D[y[t],{t,2}]==Cos[t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to -\cos (t)+c_2 t+c_1 \]
Sympy. Time used: 0.056 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-cos(t) + Derivative(y(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} + C_{2} t - \cos {\left (t \right )} \]