nonlinear differential equation system

dx1dtx1x3*x1^2/(1+x1)
dx2dtx2x3*x2^2/(1+x2)
x1+x2=2
x1(0)=0.5;x2(0)=1.5;
x3(0)=1
three equations with three unknowns,how to solve it by matlab

2 个评论

Lujia, your three initial conditions are incompatible with your three equations. Add the first two equations, and making use of the third equation which requires that d(x1+x2)/dt = 0, this will give:
0 = 2 - x3(0)*( x1(0)^2/(1+x1(0)) + x2(0)^2/(1+x2(0)) )
= 2 - 1*(0.5^2/1.5+1.5^2/2.5) = 2 - 1*(1/6+9/10) = 14/15
which is obviously false. Your initial value for x3 would have to be
x3(0) = 1.875
to be compatible.
yes,you are right,thanks

请先登录,再进行评论。

 采纳的回答

Your three equations can be reduced to one equation. By using the second two equations it can be deduced that
x2 = 2 - x1
x3 = (1+x1)*(3-x1)/2
and from this a single equation in x1 can be obtained:
dx1/dt = x1-3/2*x1^2+1/2*x1^3
From this by partial fractions it follows that:
log(abs(x1*(x1-2)/(x1-1)^2)) = t-t0
for an arbitrary constant t0, and from this
x1*(x1-2)/(x1-1)^2 = ±exp(t-t0)
This is a quadratic equation that can be solved for x1 and thereby obtain explicit expressions for x1(t) in terms of exp(t-t0). For that reason you would not have to use the numerical ‘ode’ functions.

1 个评论

Added note: For your particular initial condition, x1(0) = 0.5 and x2(0) = 1.5, and assuming you correct x3(0) to 1.875, you would have as a solution
x1(t) = 1 - (1 + exp(t-t0))^(-1/2)
x2(t) = 1 + (1 + exp(t-t0))^(-1/2)
x3(t) = (1+x1(t))*(1+x2(t))/2 = 2 - 1/2*(1 + exp(t-t0))^(-1)
where t0 = -log(3).

请先登录,再进行评论。

更多回答(0 个)

类别

Community Treasure Hunt

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

Start Hunting!

Translated by