Internal
problem
ID
[17598]
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.5
(Nonhomogeneous
Equations,
Method
of
Undetermined
Coefficients).
Problems
at
page
260
Problem
number
:
38
Date
solved
:
Thursday, March 13, 2025 at 10:37:45 AM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(y(t),t),t)+2*diff(y(t),t)+5*y(t) = piecewise(0 <= t and t <= 1/2*Pi,1,1/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}]+2*D[y[t],t]+5*y[t]==Piecewise[{ {1,0<=t<=Pi/2}, {0,t>Pi/2} }]; 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((1, (t >= 0) & (t <= pi/2)), (0, t > pi/2)) + 5*y(t) + 2*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) ics = {} dsolve(ode,func=y(t),ics=ics)