Slove function return empty solutions

3 views (last 30 days)
Roy
Roy on 16 Mar 2023
Commented: Walter Roberson on 24 Mar 2023
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)

Answers (2)

Walter Roberson
Walter Roberson on 16 Mar 2023
Use dsolve for differential equations
  20 Comments
Roy
Roy on 21 Mar 2023
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.

Sign in to comment.


Roy
Roy on 21 Mar 2023
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 Comments
Roy
Roy on 22 Mar 2023
Edited: Roy on 22 Mar 2023
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

Sign in to comment.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by