How can we solve time dependent non linear equations?

7 views (last 30 days)
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
Shadab Ali
Shadab Ali on 13 Oct 2023
Edited: Shadab Ali on 13 Oct 2023
Thanking for your response.
These are the equations to solve.
choose some initial condidtion in such a manner.
(z_1(0),z_2(0),z_3(0),z_4(0))=(0, 1, 0.5, 0)
with parameter values
a=0.9; b=0.2; c=1.5; d=1; k=0.05;
Finally, the output of the equations M1, M2, M3 and M4.
I hope now you can easily understand the problem..
Thans!
Torsten
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.

Sign in to comment.

Answers (2)

Torsten
Torsten on 12 Oct 2023
Moved: Torsten on 12 Oct 2023
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.

Sam Chak
Sam Chak on 12 Oct 2023
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)
Equation solved. fsolve completed because the vector of function values is near zero as measured by the value of the function tolerance, and the problem appears regular as measured by the gradient.
x =
0.0000 + 2.9120i 0.0000 + 2.7350i 4.0058 + 0.0000i
fval =
1.0e-09 * -0.6226 + 0.0022i 0.0001 + 0.0000i -0.6225 + 0.0011i
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
Sam Chak on 13 Oct 2023
Feel like I'm seeing the Differential Algebraic Equations (DAEs). Can you verify that?

Sign in to comment.

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!