Strange constants in desolve_system result for first-order linear system

asked 2024-11-19 04:23:22 +0100

Nate Eldredge gravatar image

I'm trying to find the general solution of a first-order linear system with desolve_system:

var('t')
y=function('y')(t)
x=function('x')(t)
desolve_system([diff(x,t) == y, diff(y,t) == -10*x + -2*y], [x,y])

The output is: [x(t) == 1/3*((x(0) + 1)*sin(3*t) + 3*cos(3*t)*x(0))*e^(-t), y(t) == -1/3*((10*x(0) + 1)*sin(3*t) - 3*cos(3*t))*e^(-t)]

There ought to be two unknown constants, possibly x(0) and y(0), but instead there's only x(0), and a very strange-looking x(0) + 1. Is this a bug, or do I need to interpret it somehow?

When I specify initial conditions (ics=(0,1,2)) everything works fine.

This is with SageMath version 10.4, Release Date: 2024-07-19 on MacOS arm64 installed from the Homebrew cask.

edit retag flag offensive close merge delete