Internal
problem
ID
[4557]
Book
:
Differential
equations
for
engineers
by
Wei-Chau
XIE,
Cambridge
Press
2010
Section
:
Chapter
7.
Systems
of
linear
differential
equations.
Problems
at
page
351
Problem
number
:
7.25
Date
solved
:
Tuesday, March 04, 2025 at 06:52:22 PM
CAS
classification
:
system_of_ODEs
With initial conditions
ode:=[diff(x(t),t)-2*x(t)-y(t) = 2*exp(t), diff(y(t),t)-2*y(t)-4*z(t) = 4*exp(2*t), x(t)-diff(z(t),t)-z(t) = 0]; ic:=x(0) = 9y(0) = 3z(0) = 1; dsolve([ode,ic]);
ode={D[x[t],t]-2*x[t]-y[t]==2*Exp[t],D[y[t],t]-2*y[t]-4*z[t]==4*Exp[2*t],x[t]-D[z[t],t]-z[t]==0}; ic={x[0]==9,y[0]==3,z[0]== 1}; DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") x = Function("x") y = Function("y") z = Function("z") ode=[Eq(-2*x(t) - y(t) - 2*exp(t) + Derivative(x(t), t),0),Eq(-2*y(t) - 4*z(t) - 4*exp(2*t) + Derivative(y(t), t),0),Eq(x(t) - z(t) - Derivative(z(t), t),0)] ics = {} dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)