Borrar filtros
Borrar filtros

Empty Sym 0-by-1

11 visualizaciones (últimos 30 días)
Sherwin
Sherwin el 8 de Abr. de 2022
Comentada: Walter Roberson el 10 de Abr. de 2022
Hi, I have this code which returns empty sym for ustar. I thought it's because maybe I can't get u as a closed form solution from ustar. but it is not the case apparently. Can soneone please help me?
syms Z f u T Tp lm D ro p l ge k2 C gw gc alp r hstar ustar
Z = ((T-Tp)*lm*u)/f + ((p*f*gw)/k2) + ((p^2)*f*l*alp*r*gc)/(D*u*C) + (ro*p*(l^2)*u*ge)/f*D;
df = diff(Z,f);
fstar = solve (df==0,f);
Z = subs(Z,f,fstar(1,1));
du = diff(Z,u);
ustar = solve(du==0,u);

Respuestas (2)

Torsten
Torsten el 8 de Abr. de 2022
If you print out "du", you will see that it has no zero (the numerator does not depend on u):
du = (sym)
/ 2 \
-C*D*gw*\D*ge*l *p*ro + T*lm - Tp*lm/
------------------------------------------------------------------------
______________________________________
/ / 2 \
/ C*D*k2*\D*ge*l *p*ro + T*lm - Tp*lm/
/ ------------------------------------ *(C*D*gw*u + alp*gc*k2*l*p*r)
\/ p*(C*D*gw*u + alp*gc*k2*l*p*r)
  3 comentarios
Walter Roberson
Walter Roberson el 9 de Abr. de 2022
pretty()
Sherwin
Sherwin el 9 de Abr. de 2022
Thank you so much.

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 9 de Abr. de 2022
It is not completely correct to say that du has no zero, on the basis that the numerator is independent of u. You must look at the denominator as well, and ask if there are conditions under which it is infinite.
The denominator involves u in a couple of places. If you extract the denominator it is the product of three terms. The first term is independent of u. Take the limit of the second term as u approaches inf or -inf and you get inf, hinting that possibly you can make the overall denominator infinite. The third term involves an expression divided by a function of u, raised to a power. As u goes to infinity, that would lead to 1/inf which would be 0. So... we have adjacent terms that progress to infinity times 1/infinity, which is a potential problem.
If you make the assumption that p is positive then you can lift it p outside the denominator of the third term. You end up with an expression in u, squared, times something divided by the same expression in u but raised to the 3/2. If you assume that the expression is positive, then you can merge powers and you end up with the square root of an expression in u, times some things that do not involve u. And that can indeed go to infinity as u goes to inf...
All of which means that there is an overall zero for du, at +inf or -inf or both... but depending on the signs of some variables you might potentially be working with a complex infinity.
  2 comentarios
Torsten
Torsten el 9 de Abr. de 2022
Editada: Torsten el 9 de Abr. de 2022
So you are saying that 1/x has a zero at x = Inf ? It's an unusual view, but ok if we consider
IR \/ {+oo,-oo}.
Walter Roberson
Walter Roberson el 10 de Abr. de 2022
We took a derivative using diff(); we are pretty much already assuming that it is meaningful to calculate with infinities.

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by