How to solve coupled differential equation?
Show older comments

Not entirely too sure how to get started solving two differential equations at the same time. I've only had experience doing one with Euler's method. A push in the right direction would be appreciated, thanks.
1 Comment
Ntokozo Khumalo
on 11 May 2022
Notice that
then this becomes the linear first order homogeneous equation, hence then solution for it is
.
. Answers (1)
Steven Lord
on 30 Jan 2018
0 votes
11 Comments
Natasha Simone
on 30 Jan 2018
James Tursa
on 30 Jan 2018
It applies to any number of variables. The order of your system of ODE's will simply determine the size of the state vector you need to use with the MATLAB functions.
sardar peysin
on 11 Apr 2022
Hello dear Lord. Can you help me to get the solutions for y(x) and z(x) in two coupled differential equations simultaneously? I need solutions for each of y and z as the equations (for example y=C1 exp (A/B)x or z=C1 exp (B//A)x) not as numbers.

Steven Lord
on 11 Apr 2022
To solve a system of differential equations symbolically you will need to use Symbolic Math Toolbox.
Just curious. Why did you repost here? I thought you have satifactorily accepted the Answer by @Walter Roberson 9 months ago. If you are looking for a new Answer from a different perspective, shouldn't you post a new question?
Anyhow, this should give you the overall picture of the system behavior (divergence and convergence), depending on the selection of A and B.

I'm afraid that the system may not have a closed-form analytical solution that you are looking for.
sardar peysin
on 11 Apr 2022
Hello dear. It is not important if the system does not have a closed-form solution. I only need a reasonable solution for this system of coupled equations. I talked to Mr Walter Roberson and he did his best. He gave me a code of Maple, but his code is not being run in my Maple and it gives error. This is the reason that I tried to find somebody else to give me another idea for solving these equations. Can you generate a MATLAB or Maple code for solving these coupled equations even if boundary conditions y(0) and z(0) are to be considered as initial or boundary conditions to help solution procedure.
Torsten
on 11 Apr 2022
A = 1.0;
B = 1.0;
fun=@(x)[-A*x(1)*x(2)^4;-B*x(1)^2*x(2)^3];
y0 = 1.0;
z0 = 1.0;
x0 = [y0;z0];
tspan = [0 1];
[T,Z] = ode45(fun,tspan,x0)
plot(T,Z)
Sam Chak
on 12 Apr 2022
If you are looking for a new Answer, or specifically the MATLAB code to solve the ODE when the constants A and B, and initial values are known, then post a new question with the information clearly provided:
- ODE of the nonlinear system,
- constant values of A and B,
- initial values of
and
.
Please clearly describe what type of solution that you desire since the closed-form analytical solution is impossible. For example, you may say that a numerical solution is not good enough. At least, an Approximate Analytical Solution is desired, which maybe achievable with the generation of sufficient dat points and the Curve-Fitting Toolbox.
In fact, @Torsten has provided an Example of how to solve it. It is not good to continue 'hijacking' another user's question especially when yours is not directly related to it.
sardar peysin
on 12 Apr 2022
Edited: sardar peysin
on 12 Apr 2022
Ok, Thankyou very much.
Sam Chak
on 12 Apr 2022
The time 't' is missing. It should be fine now.
fun = @(t, x)[-A*x(1)*x(2)^4;-B*x(1)^2*x(2)^3];
sardar peysin
on 12 Apr 2022
Mr. Sam Chak and Mr. Torstan as you adviced I posted a new question in Mathwork. I would be greatful if you could help me. This is the link:
https://www.mathworks.com/matlabcentral/answers/1694515-getting-a-solution-for-two-coupled-nonlinear-differential-equations
Categories
Find more on Ordinary Differential Equations 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!