Internal problem ID [12079]
Book: Differential Equations, Linear, Nonlinear, Ordinary, Partial. A.C. King, J.Billingham,
S.R.Otto. Cambridge Univ. Press 2003
Section: Chapter 1 VARIABLE COEFFICIENT, SECOND ORDER DIFFERENTIAL
EQUATIONS. Problems page 28
Problem number: Problem 1.3(d).
ODE order: 2.
ODE degree: 1.
CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {y^{\prime \prime }+y=f \left (x \right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 0, y^{\prime }\left (0\right ) = 0] \end {align*}
✓ Solution by Maple
Time used: 0.0 (sec). Leaf size: 34
dsolve([diff(y(x),x$2)+y(x)=f(x),y(0) = 0, D(y)(0) = 0],y(x), singsol=all)
\[ y \left (x \right ) = \left (\int _{0}^{x}\cos \left (\textit {\_z1} \right ) f \left (\textit {\_z1} \right )d \textit {\_z1} \right ) \sin \left (x \right )-\left (\int _{0}^{x}\sin \left (\textit {\_z1} \right ) f \left (\textit {\_z1} \right )d \textit {\_z1} \right ) \cos \left (x \right ) \]
✓ Solution by Mathematica
Time used: 0.105 (sec). Leaf size: 77
DSolve[{y''[x]+y[x]==f[x],{y[0]==0,y'[0]==0}},y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to -\sin (x) \int _1^0\cos (K[2]) f(K[2])dK[2]+\sin (x) \int _1^x\cos (K[2]) f(K[2])dK[2]+\cos (x) \left (\int _1^x-f(K[1]) \sin (K[1])dK[1]-\int _1^0-f(K[1]) \sin (K[1])dK[1]\right ) \]