How can we solve time dependent non linear equations?
7 views (last 30 days)
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
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)
Sam Chak
on 12 Oct 2023
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
Sam Chak
on 13 Oct 2023
Feel like I'm seeing the Differential Algebraic Equations (DAEs). Can you verify that?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!