Internal
problem
ID
[16914]
Book
:
Ordinary
Differential
Equations.
An
introduction
to
the
fundamentals.
Kenneth
B.
Howell.
second
edition.
CRC
Press.
FL,
USA.
2020
Section
:
Chapter
30.
Piecewise-defined
functions
and
periodic
functions.
Additional
Exercises.
page
553
Problem
number
:
30.10
(c)
Date
solved
:
Thursday, October 02, 2025 at 01:40:19 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
Using Laplace method With initial conditions
ode:=diff(diff(y(t),t),t)+9*y(t) = piecewise(t < 1,0,1 < t and t < 3,1,3 < t,0); ic:=[y(0) = 0, D(y)(0) = 0]; dsolve([ode,op(ic)],y(t),method='laplace');
ode=D[y[t],{t,2}]+9*y[t]==Piecewise[{ {0,t<1},{1,1<t<3},{0,t>3}}]; ic={y[0]==0,Derivative[1][y][0] ==0}; DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") y = Function("y") ode = Eq(-Piecewise((0, t < 1), (1, (t > 1) & (t < 3)), (0, t > 3)) + 9*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)