Internal
problem
ID
[15931]
Book
:
INTRODUCTORY
DIFFERENTIAL
EQUATIONS.
Martha
L.
Abell,
James
P.
Braselton.
Fourth
edition
2014.
ElScAe.
2014
Section
:
Chapter
2.
First
Order
Equations.
Exercises
2.3,
page
49
Problem
number
:
42
Date
solved
:
Monday, March 31, 2025 at 02:13:43 PM
CAS
classification
:
[[_linear, `class A`]]
With initial conditions
ode:=diff(y(t),t)+y(t) = piecewise(0 <= t and t < 2,4,2 <= t,0); ic:=y(0) = 0; dsolve([ode,ic],y(t), singsol=all);
ode=D[y[t],t]+y[t]==Piecewise[{{4,0<=t<2},{0,t>=2}}]; ic={y[0]==0}; DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") y = Function("y") ode = Eq(-Piecewise((4, (t >= 0) & (t < 2)), (0, t >= 2)) + y(t) + Derivative(y(t), t),0) ics = {y(0): 0} dsolve(ode,func=y(t),ics=ics)