Slove function return empty solutions

4 次查看(过去 30 天)
Hello, I'm trying to solve the attached syntax, but the aolve function return empty solutions. Please help.
syms V_1 V_2 x_1 x_2 r
pi1 = (V_1) * (x_1^r/(x_1^r+x_2^r)) - x_1
pi2 = (V_2) * (x_2^r/(x_1^r+x_2^r)) - x_2
dpi1dx = diff(pi1, x_1)
dpi2dx = diff(pi2, x_2)
s = solve(dpi1dx==0, dpi2dx==0, x_1, x_2)

回答(2 个)

Walter Roberson
Walter Roberson 2023-3-16
Use dsolve for differential equations
  20 个评论
Walter Roberson
Walter Roberson 2023-3-21
The problem is not solveable for most r .
For example for r = 3/2 then the solutions are
RootOf(4*Z^3*x_2^(3/2) + 2*Z^6 - 3*Z*x_2^(3/2)*V_1 + 2*x_2^3,Z)^2
which is the set of Z such that the expression 4*etc becomes 0. But notice the Z^6 part -- so you would need the closed-form solution for a degree 6 polynomial, and such solutions only exist if the expression can be factored into polynomials of degree 4 or lower.
If r = N/4 for odd integer N, then you need to solve something of degree either 2*N+4 (for small N) or degree 2*N (starting at N = 5). r = 1/5 and r = 3/5 are tractable (but long!!), the other N/5 are not tractable.
Roy
Roy 2023-3-21
noway :(
this is the solution for general r and V_1 != V_2
x_1 = V_2*(r*(V_2/V_1)^(r-1))/(1+(V_2/V_1)^r)^2
x_2 = V_1*(r*(V_1/V_2)^(r-1))/(1+(V_1/V_2)^r)^2
placing x_1 and x_2 and the dpi1dx and dpi2dx become them to 0.

请先登录,再进行评论。


Roy
Roy 2023-3-21
Why MATLAB can't solve this simple equations?
the solution for general r and V_1 != V_2:
x_1 = V_2*(r*(V_2/V_1)^(r-1))/(1+(V_2/V_1)^r)^2
x_2 = V_1*(r*(V_1/V_2)^(r-1))/(1+(V_1/V_2)^r)^2
placing x_1 and x_2 and the dpi1dx and dpi2dx become them to 0.
  3 个评论
Walter Roberson
Walter Roberson 2023-3-22
If you add the assumption of positive then they do resolve to 0
syms V_1 V_2 x_1 x_2 r positive
pi1 = (V_1) * (x_1^r/(x_1^r+x_2^r)) - x_1
pi1 = 
pi2 = (V_2) * (x_2^r/(x_1^r+x_2^r)) - x_2
pi2 = 
dpi1dx = diff(pi1, x_1)
dpi1dx = 
dpi2dx = diff(pi2, x_2)
dpi2dx = 
simplify(subs(dpi1dx,[x_1 x_2],[V_2*(r*(V_2/V_1)^(r-1))/(1+(V_2/V_1)^r)^2,V_1*(r*(V_1/V_2)^(r-1))/(1+(V_1/V_2)^r)^2]))
ans = 
0
simplify(subs(dpi2dx,[x_1 x_2],[V_2*(r*(V_2/V_1)^(r-1))/(1+(V_2/V_1)^r)^2,V_1*(r*(V_1/V_2)^(r-1))/(1+(V_1/V_2)^r)^2]))
ans = 
0
Roy
Roy 2023-3-22
编辑:Roy 2023-3-22
So why MATLAB can't solve it, and extract these x_1 and x_2 when dpi1dx=0 and dpi2dx=0 using solve() or something else?
Btw, all the varibles are positive
There is solution for this simple equations :(
x_1 = V_2*(r*(V_2/V_1)^(r-1))/(1+(V_2/V_1)^r)^2 x_2 = V_1*(r*(V_1/V_2)^(r-1))/(1+(V_1/V_2)^r)^2

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by