필터 지우기
필터 지우기

Empty Sym 0-by-1

조회 수: 11 (최근 30일)
Sherwin
Sherwin 2022년 4월 8일
댓글: Walter Roberson 2022년 4월 10일
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);

답변 (2개)

Torsten
Torsten 2022년 4월 8일
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
Walter Roberson
Walter Roberson 2022년 4월 9일
pretty()
Sherwin
Sherwin 2022년 4월 9일
Thank you so much.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2022년 4월 9일
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
Torsten
Torsten 2022년 4월 9일
편집: Torsten 2022년 4월 9일
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 2022년 4월 10일
We took a derivative using diff(); we are pretty much already assuming that it is meaningful to calculate with infinities.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by