Internal
problem
ID
[23107]
Book
:
An
introduction
to
Differential
Equations.
By
Howard
Frederick
Cleaves.
1969.
Oliver
and
Boyd
publisher.
ISBN
0050015044
Section
:
Chapter
4.
Linear
equations
of
the
first
order.
Exercise
4a
at
page
56
Problem
number
:
14
Date
solved
:
Thursday, October 02, 2025 at 09:22:02 PM
CAS
classification
:
[[_linear, `class A`]]
With initial conditions
ode:=diff(n(t),t) = k*n(t)-b*t; ic:=[n(0) = n__0]; dsolve([ode,op(ic)],n(t), singsol=all);
ode=D[n[t],t]==k*n[t]-b*t; ic={n[0]==n0}; DSolve[{ode,ic},n[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") n0 = symbols("n0") k = symbols("k") b = symbols("b") n = Function("n") ode = Eq(b*t - k*n(t) + Derivative(n(t), t),0) ics = {n(0): n0} dsolve(ode,func=n(t),ics=ics)