Question on using "ode" and "fsolve" simultaneously

4 views (last 30 days)
Dear MATLAB experts,
I am currently trying to code a coupled system of ordinary nonlinear differential equation using "ode" function. However, the problem is the following:
For instance, I have three differential equations like:
dT(1) = T(1)^2 + 5*T(2)^3 + T_a*T(1);
dT(2) = T(2) - T_b*T(1)^2 + T(3);
dT(3) = T_a*T_b + T(3)/T(1);
Here, my T_a and T-b are parameters that change depending on the time, and they are expressed as:
T_a*65 + 100 = T_b - 5;
T_a + T_b*100 = 40/T_a
*Note that these values are randomly selected, they are not my actual equations and values...using them to simply explain the general idea.
In this case, how do you solve for "5 equations and 5 unknowns [ T(1), T(2), T(3), T_a, T_b ]"? I am a bit confused with the algorithm since both T_a and T_b also changes over time...Is it possible for me to use "fsolve" inside "ode" function?
Please help and thank you so much in advance!
  2 Comments
RahulTandon
RahulTandon on 10 Jul 2015
pleas please send the specific proble, it is solvable.
Vinicius Santana
Vinicius Santana on 11 Dec 2015
I'm in a similar situation. I'm trying to solve 2 differential equations but one of the the parameters "f" is a implicit function. In my especific case i need to solve equations like:
T'= f(f,T,V) V' = h(f,T,V) 0 = g(f,...)
My question is : How can i handle with 2 differential equations and 1 implicit function at the same time?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!