In an equation, is that possible to give two uknowns'ratio expression by using "solve" function or other accessible way ?

조회 수: 2 (최근 30일)
The equation is , is that possible to get "a/c" directly by "solve" function or other symbolic functions?
syms p p0 a r k alpha Y G
syms A B c d
sigma_re=-p0-B*r^(-(1+k));
sigma_thetae=-p0+B/k*r^(-(1+k));
sigma_rp=Y/(alpha-1)+A*r^(k*(alpha-1));
sigma_thetap=Y/(alpha-1)+A*alpha*r^(k*(alpha-1));
eqn1=subs(sigma_thetae,r,c)==subs(sigma_thetap,r,c);
eqn2=subs(sigma_re,r,c)==subs(sigma_rp,r,c);
[A1 B1]=solve([eqn1 eqn2],[A B]);
sigma_re=simplify(subs(sigma_re,B,B1),"IgnoreAnalyticConstraints",true)
sigma_re = 
sigma_thetae=simplify(subs(sigma_thetae,B,B1),"IgnoreAnalyticConstraints",true)
sigma_thetae = 
sigma_rp=simplify(subs(sigma_rp,A,A1),"IgnoreAnalyticConstraints",true)
sigma_rp = 
sigma_thetap=simplify(subs(sigma_thetap,A,A1),"IgnoreAnalyticConstraints",true)
sigma_thetap = 
sigma_rp_a=simplify(subs(sigma_rp,r,a),"IgnoreAnalyticConstraints",true)
sigma_rp_a = 
eqn3=sigma_rp_a==-p
eqn3 = 
  댓글 수: 2
Star Strider
Star Strider 2021년 9월 11일
is that possible to get "a/c" directly by "solve" function or other symbolic functions?
Please expand on this.
What result do you want?
.
Guoyao.Li
Guoyao.Li 2021년 9월 11일
I mean the expression of "c/a" derived by .
And I have tried by the following way. However, I wonder is there easy way to get the result.
syms A B c d p p0 a r k alpha Y G
sigma_re=-p0-B*r^(-(1+k));
sigma_thetae=-p0+B/k*r^(-(1+k));
sigma_rp=Y/(alpha-1)+A*r^(k*(alpha-1));
sigma_thetap=Y/(alpha-1)+A*alpha*r^(k*(alpha-1));
eqn1=subs(sigma_thetae,r,c)==subs(sigma_thetap,r,c);
eqn2=subs(sigma_re,r,c)==subs(sigma_rp,r,c);
[A1 B1]=solve([eqn1 eqn2],[A B]);
sigma_re=simplify(subs(sigma_re,B,B1),"IgnoreAnalyticConstraints",true);
sigma_thetae=simplify(subs(sigma_thetae,B,B1),"IgnoreAnalyticConstraints",true);
sigma_rp=simplify(subs(sigma_rp,A,A1),"IgnoreAnalyticConstraints",true);
sigma_thetap=simplify(subs(sigma_thetap,A,A1),"IgnoreAnalyticConstraints",true);
sigma_rp_a=simplify(subs(sigma_rp,r,a),"IgnoreAnalyticConstraints",true)
sigma_rp_a = 
c1=solve(subs(sigma_rp_a,a,1)==-p,c,"IgnoreAnalyticConstraints",true)
c1 = 
a1=solve(subs(sigma_rp_a,c,1)==-p,a,"IgnoreAnalyticConstraints",true)
a1 = 
c_a=c1/a1 %% c/a
c_a = 

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

채택된 답변

Walter Roberson
Walter Roberson 2021년 9월 11일
syms A B c d p p0 a r k alpha Y G
sigma_re=-p0-B*r^(-(1+k));
sigma_thetae=-p0+B/k*r^(-(1+k));
sigma_rp=Y/(alpha-1)+A*r^(k*(alpha-1));
sigma_thetap=Y/(alpha-1)+A*alpha*r^(k*(alpha-1));
eqn1=subs(sigma_thetae,r,c)==subs(sigma_thetap,r,c);
eqn2=subs(sigma_re,r,c)==subs(sigma_rp,r,c);
[A1 B1]=solve([eqn1 eqn2],[A B]);
sigma_re=simplify(subs(sigma_re,B,B1),"IgnoreAnalyticConstraints",true);
sigma_thetae=simplify(subs(sigma_thetae,B,B1),"IgnoreAnalyticConstraints",true);
sigma_rp=simplify(subs(sigma_rp,A,A1),"IgnoreAnalyticConstraints",true);
sigma_thetap=simplify(subs(sigma_thetap,A,A1),"IgnoreAnalyticConstraints",true);
sigma_rp_a=simplify(subs(sigma_rp,r,a),"IgnoreAnalyticConstraints",true)
sigma_rp_a = 
syms c_a
temp = simplify(subs(sigma_rp_a, c, c_a*a))
temp = 
output = simplify(solve(temp==-p,c_a,"IgnoreAnalyticConstraints",true))
output = 

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by