简体   繁体   English

在matlab中求解方程组:2个微分,1个二次

[英]Solve system of equations: 2 differential, 1 quadratic in matlab

Write a Matlab(or other) code for solving the system numericaly: w'(t)=dw(t)/dt;编写 Matlab(或其他)代码来求解系统数值:w'(t)=dw(t)/dt;

w'(t)=3*w(t)*y(t),
y'(t)=8*w(t)*y(t),
t^2=9+w(t)+y(t)

I don't know how to use ode45 for this as t has 2 solutions.我不知道如何为此使用 ode45,因为 t 有 2 个解决方案。

Why do you need to solve this numerically?为什么你需要用数值来解决这个问题? For a numeric solution, you would need at least an initial condition, ie w(0), y0) .对于数值解,您至少需要一个初始条件,即w(0), y0)

Note that, by comparing the first two equations: 8w'(t) = 3y'(t)注意,通过比较前两个方程: 8w'(t) = 3y'(t)

Then, derive the third equation to obtain:然后,推导出第三个方程,得到:

2t = w'(t)+y'(t)

This implies :这意味着 :

8*3*2t = 8*3*w'(t)+8*3*y'(t)

48t = 8*3*w'(t)+8*8*w'(t)

48t = 88*w'(t)

6t = 11*w'(t)

Thus w'(0)=0 and y'(0)=0 .因此w'(0)=0y'(0)=0

Therefore, from the first equation: w(0)*y(0)=0 .因此,从第一个方程: w(0)*y(0)=0

Because the equations are symmetric, there are two solutions as you mention.因为方程是对称的,所以你提到有两种解决方案。 Assume w(0)=0 , then from the third equation, 'y(0)=-9'.假设w(0)=0 ,那么从第三个方程,'y(0)=-9'。 And from 6t = 11*w'(t) we have w(t)=(6/11)t , and y(t)=-9+(48/33)t .6t = 11*w'(t)我们有w(t)=(6/11)ty(t)=-9+(48/33)t

The other solution is y(t)=(6/11)t , and w(t)=-9+(48/33)t .另一个解决方案是y(t)=(6/11)tw(t)=-9+(48/33)t

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM