20.1.30 problem Problem 38

Internal problem ID [3587]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.2, Basic Ideas and Terminology. page 21
Problem number : Problem 38
Date solved : Monday, January 27, 2025 at 07:46:41 AM
CAS classification : [[_2nd_order, _quadrature]]

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

With initial conditions

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

Solution by Maple

Time used: 0.012 (sec). Leaf size: 11

dsolve([diff(y(x),x$2)=cos(x),y(0) = 2, D(y)(0) = 1],y(x), singsol=all)
 
\[ y \left (x \right ) = -\cos \left (x \right )+x +3 \]

Solution by Mathematica

Time used: 0.010 (sec). Leaf size: 12

DSolve[{D[y[x],{x,2}]==Cos[x],{y[0]==2,Derivative[1][y][0] ==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x-\cos (x)+3 \]