How can we solve time dependent non linear equations?
Show older comments
Consider the time dependent nonlinear equaionbs as follows;
a=0.2; b=2.92; c=4; %%Constant
f1(x(t),y(t),z(t)) = -a*a - b*b + y(t)*y(t) + z(t)*z(t);
f2(x(t),y(t),z(t)) = -b*b - c*c - x(t)*x(t) + z(t)*z(t);
f3(x(t),y(t),z(t)) = -1- x(t)*x(t) + y(t)*y(t);
where time 't' is varying from 0 to 1000/infinity....
NOTE:
f1, f2 and f3 are only function of variables x(t) ,y(t) and z(t) respectively. They are not representing derivative with respect to time 't'.
How can we sove them and how can plot them with respect to time?
Please help me regarding this issue.
Thanking you!
4 Comments
Fabio Freschi
on 12 Oct 2023
I don't see the time dependance of your equations
Shadab Ali
on 13 Oct 2023
Shadab Ali
on 13 Oct 2023
Edited: Shadab Ali
on 13 Oct 2023
Torsten
on 13 Oct 2023
You didn't specify the time-dependent functions for M1, M2, M3 and M4. Further, z4 is missing in your set of equations.
Answers (2)
Use "fsolve" for each value of t separately for your three equations from above.
You may use the solution of time t as initial guess for time t+1.
Hi @Shadab Ali
Do you expect complex-valued solutions?
x0 = [3i 3i 4];
% there are 7 other solutions
% x0 = [ 3i 3i -4];
% x0 = [ 3i -3i 4];
% x0 = [ 3i -3i -4];
% x0 = [-3i 3i 4];
% x0 = [-3i 3i -4];
% x0 = [-3i -3i 4];
% x0 = [-3i -3i -4];
[x, fval] = fsolve(@fun, x0)
function f = fun(x)
% Constants
a = 0.2;
b = 2.92;
c = 4;
% Equations
f(1) = - a*a - b*b + x(2)*x(2) + x(3)*x(3);
f(2) = - b*b - c*c - x(1)*x(1) + x(3)*x(3);
f(3) = - 1 - x(1)*x(1) + x(2)*x(2);
end
3 Comments
Shadab Ali
on 13 Oct 2023
Edited: Shadab Ali
on 13 Oct 2023
Sam Chak
on 13 Oct 2023
Feel like I'm seeing the Differential Algebraic Equations (DAEs). Can you verify that?
Shadab Ali
on 19 Dec 2023
Categories
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


