May-29-2022, 06:17 PM
(This post was last modified: May-29-2022, 06:19 PM by babaliaris.)
Is there a way to do maths in python that results in parameterized solutions?
For example 2a+3a = 5a
What I want to do is, to use an algorithm named as Runge-Kutta 4th order to the following differential equations
Y'(t) = -aY(t)E(t)
E'(t) = aY(t)E(t) - bE(t)
T'(t) = bE(t)
I know the values of E(t), Y(t), T(t) at any time t, but I need to find a and b.
In hand, I know how to do this. I just need to do 110 loops from 0 to 109 for each of the 3 diff equations. This will result in three
parameterized equations E(109), Y(109), T(109) that include the a and b. And then I need to solve a 3x2 system to
find a and b.
The problem is that in Python and any programming language, you can only calculate numbers. Not equations and
then solve a system...
Thank you!
For example 2a+3a = 5a
What I want to do is, to use an algorithm named as Runge-Kutta 4th order to the following differential equations
Y'(t) = -aY(t)E(t)
E'(t) = aY(t)E(t) - bE(t)
T'(t) = bE(t)
I know the values of E(t), Y(t), T(t) at any time t, but I need to find a and b.
In hand, I know how to do this. I just need to do 110 loops from 0 to 109 for each of the 3 diff equations. This will result in three
parameterized equations E(109), Y(109), T(109) that include the a and b. And then I need to solve a 3x2 system to
find a and b.
The problem is that in Python and any programming language, you can only calculate numbers. Not equations and
then solve a system...
Thank you!