Internal
problem
ID
[13270]
Book
:
Differential
Equations
by
Shepley
L.
Ross.
Third
edition.
John
Willey.
New
Delhi.
2004.
Section
:
Chapter
2,
section
2.3
(Linear
equations).
Exercises
page
56
Problem
number
:
28
Date
solved
:
Monday, March 31, 2025 at 07:44:41 AM
CAS
classification
:
[[_linear, `class A`]]
With initial conditions
ode:=diff(y(x),x)+y(x) = piecewise(0 <= x and x < 10,5,10 <= x,1); ic:=y(0) = 6; dsolve([ode,ic],y(x), singsol=all);
ode=D[y[x],x]+y[x]==Piecewise[{{5,0<=x<10},{1,x>=10}}]; ic={y[0]==6}; DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
from sympy import * x = symbols("x") y = Function("y") ode = Eq(-Piecewise((5, (x >= 0) & (x < 10)), (1, x >= 10)) + y(x) + Derivative(y(x), x),0) ics = {y(0): 6} dsolve(ode,func=y(x),ics=ics)