Internal
problem
ID
[2690]
Book
:
Differential
equations
and
their
applications,
4th
ed.,
M.
Braun
Section
:
Chapter
2.
Second
order
differential
equations.
Section
2.11,
Differential
equations
with
discontinuous
right-hand
sides.
Excercises
page
243
Problem
number
:
6
Date
solved
:
Tuesday, March 04, 2025 at 02:34:21 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
Using Laplace method With initial conditions
ode:=diff(diff(y(t),t),t)+2*diff(y(t),t)+y(t) = piecewise(0 <= t and t < 1/2*Pi,sin(2*t),1/2*Pi <= t,0); ic:=y(0) = 1, D(y)(0) = 0; dsolve([ode,ic],y(t),method='laplace');
ode=D[y[t],{t,2}]+2*D[y[t],t]+y[t]==Piecewise[{{Sin[2*t],0<=t<Pi/2},{0,t>=Pi/2}}]; ic={y[0]==1,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((sin(2*t), (t >= 0) & (t < pi/2)), (0, t >= pi/2)) + y(t) + 2*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) ics = {y(0): 1, Subs(Derivative(y(t), t), t, 0): 0} dsolve(ode,func=y(t),ics=ics)