Internal
problem
ID
[3484]
Book
:
Mathematical
methods
for
physics
and
engineering,
Riley,
Hobson,
Bence,
second
edition,
2002
Section
:
Chapter
15,
Higher
order
ordinary
differential
equations.
15.4
Exercises,
page
523
Problem
number
:
Problem
15.1
Date
solved
:
Tuesday, September 30, 2025 at 06:40:38 AM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(x(t),t),t)+omega__0^2*x(t) = a*cos(omega*t); ic:=[x(0) = 0, D(x)(0) = 0]; dsolve([ode,op(ic)],x(t), singsol=all);
ode=D[x[t],{t,2}]+(Subscript[\[Omega],0])^2*x[t]==a*Cos[\[Omega]*t]; ic={x[0]==0,Derivative[1][x][0 ]==0}; DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") a = symbols("a") omega = symbols("omega") omega__0 = symbols("omega__0") x = Function("x") ode = Eq(-a*cos(omega*t) + omega__0**2*x(t) + Derivative(x(t), (t, 2)),0) ics = {x(0): 0, Subs(Derivative(x(t), t), t, 0): 0} dsolve(ode,func=x(t),ics=ics)