Borrar filtros
Borrar filtros

Slove function return empty solutions

5 visualizaciones (últimos 30 días)
Roy
Roy el 16 de Mzo. de 2023
Comentada: Walter Roberson el 24 de Mzo. de 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)
  2 comentarios
Roy
Roy el 24 de Mzo. de 2023
Please help
Walter Roberson
Walter Roberson el 24 de Mzo. de 2023
I am very busy these days.

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 16 de Mzo. de 2023
Use dsolve for differential equations
  20 comentarios
Walter Roberson
Walter Roberson el 21 de Mzo. de 2023
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 el 21 de Mzo. de 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.

Iniciar sesión para comentar.


Roy
Roy el 21 de Mzo. de 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 comentarios
Walter Roberson
Walter Roberson el 22 de Mzo. de 2023
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 el 22 de Mzo. de 2023
Editada: Roy el 22 de Mzo. de 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

Iniciar sesión para comentar.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by