Internal
problem
ID
[17599]
Book
:
Differential
equations.
An
introduction
to
modern
methods
and
applications.
James
Brannan,
William
E.
Boyce.
Third
edition.
Wiley
2015
Section
:
Chapter
4.
Second
order
linear
equations.
Section
4.6
(Forced
vibrations,
Frequency
response,
and
Resonance).
Problems
at
page
272
Problem
number
:
14
Date
solved
:
Thursday, March 13, 2025 at 10:38:04 AM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(y(t),t),t)+y(t) = piecewise(0 <= t and t <= Pi,A*t,Pi < t and t <= 2*Pi,A*(2*Pi-t),2*Pi < t,0); ic:=y(0) = 0, D(y)(0) = 0; dsolve([ode,ic],y(t), singsol=all);
ode=D[y[t],{t,2}]+y[t]==Piecewise[{ {A*t,0<=t<=Pi}, {A*(2*Pi-t),Pi<t<=2*Pi},{0,t>2*Pi} }]; ic={y[0]==0,Derivative[1][y][0] == 0}; DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") A = symbols("A") y = Function("y") ode = Eq(-Piecewise((A*t, (t >= 0) & (t <= pi)), (A*(-t + 2*pi), (t > pi) & (t <= 2*pi)), (0, t > 2*pi)) + y(t) + Derivative(y(t), (t, 2)),0) ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 0} dsolve(ode,func=y(t),ics=ics)