Filter löschen
Filter löschen

Empty Sym 0-by-1

11 Ansichten (letzte 30 Tage)
Sherwin
Sherwin am 8 Apr. 2022
Kommentiert: Walter Roberson am 10 Apr. 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);

Antworten (2)

Torsten
Torsten am 8 Apr. 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 Kommentare
Walter Roberson
Walter Roberson am 9 Apr. 2022
pretty()
Sherwin
Sherwin am 9 Apr. 2022
Thank you so much.

Melden Sie sich an, um zu kommentieren.


Walter Roberson
Walter Roberson am 9 Apr. 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 Kommentare
Torsten
Torsten am 9 Apr. 2022
Bearbeitet: Torsten am 9 Apr. 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 am 10 Apr. 2022
We took a derivative using diff(); we are pretty much already assuming that it is meaningful to calculate with infinities.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by