Internal
problem
ID
[3972]
Book
:
Differential
equations
and
linear
algebra,
Stephen
W.
Goode
and
Scott
A
Annin.
Fourth
edition,
2015
Section
:
Chapter
10,
The
Laplace
Transform
and
Some
Elementary
Applications.
Exercises
for
10.7.
page
704
Problem
number
:
Problem
46
part
b
Date
solved
:
Sunday, March 30, 2025 at 02:13:23 AM
CAS
classification
:
[[_linear, `class A`]]
With initial conditions
ode:=diff(y(t),t)-y(t) = piecewise(0 <= t and t < 1,2,1 <= t,-1); ic:=y(0) = 1; dsolve([ode,ic],y(t), singsol=all);
ode=D[y[t],t]-y[t]==Piecewise[{{2,0<=t<1},{-1,t>=1}}]; ic={y[0]==1}; DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") y = Function("y") ode = Eq(-Piecewise((2, (t >= 0) & (t < 1)), (-1, t >= 1)) - y(t) + Derivative(y(t), t),0) ics = {y(0): 1} dsolve(ode,func=y(t),ics=ics)