Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to solve a system of differential equations

I wonder where is my mistake. This system is linear has only two equations. I want the analytical solution but Sagemath returns an error

var('X Y X0 Y0 t a0 b0 A0 a1 b1 A1')
X = function('X')(t)
Y = function('Y')(t)
de1=(diff(X,t) - a0*X - b0*Y + A0 == 0)
de2=(diff(Y,t) - a1*X - b1*Y + A1 == 0)
show(de1)
show(de2)
sol=desolve([de1,de2],[X,Y],[0,X0,Y0],t)
show(sol)

How to solve a system of differential equations

I wonder where is my mistake. This system is linear has only two equations. I want the analytical solution but Sagemath returns an error

var('X Y X0 Y0 t a0 b0 A0 a1 b1 A1')
X = function('X')(t)
Y = function('Y')(t)
de1=(diff(X,t) - a0*X - b0*Y + A0 == 0)
de2=(diff(Y,t) - a1*X - b1*Y + A1 == 0)
show(de1)
show(de2)
sol=desolve([de1,de2],[X,Y],[0,X0,Y0],t)
sol=desolve_system([de1,de2],[X,Y],[0,X0,Y0],t)
show(sol)