Internal
problem
ID
[13699]
Book
:
AN
INTRODUCTION
TO
ORDINARY
DIFFERENTIAL
EQUATIONS
by
JAMES
C.
ROBINSON.
Cambridge
University
Press
2004
Section
:
Chapter
15,
Resonance.
Exercises
page
148
Problem
number
:
15.1
Date
solved
:
Wednesday, March 05, 2025 at 10:13:11 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(x(t),t),t)+omega^2*x(t) = cos(alpha*t); ic:=x(0) = 0, D(x)(0) = 0; dsolve([ode,ic],x(t), singsol=all);
ode=D[x[t],{t,2}]+w^2*x[t]==Cos[a*t]; ic={x[0]==0,Derivative[1][x][0 ]==0}; DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") Alpha = symbols("Alpha") omega = symbols("omega") x = Function("x") ode = Eq(omega**2*x(t) - cos(Alpha*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)