Internal
problem
ID
[4553]
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.21
Date
solved
:
Tuesday, March 04, 2025 at 06:52:19 PM
CAS
classification
:
system_of_ODEs
With initial conditions
ode:=[diff(x(t),t)-2*x(t)+y(t) = 5*exp(t)*cos(t), x(t)+diff(y(t),t)-2*y(t) = 10*exp(t)*sin(t)]; ic:=x(0) = 0y(0) = 0; dsolve([ode,ic]);
ode={D[x[t],t]-2*x[t]+y[t]==5*Exp[t]*Cos[t],x[t]+D[y[t],t]-2*y[t]==10*Exp[t]*Sin[t]}; ic={x[0]==0,y[0]==0}; DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") x = Function("x") y = Function("y") ode=[Eq(-2*x(t) + y(t) - 5*exp(t)*cos(t) + Derivative(x(t), t),0),Eq(x(t) - 2*y(t) - 10*exp(t)*sin(t) + Derivative(y(t), t),0)] ics = {} dsolve(ode,func=[x(t),y(t)],ics=ics)