Hi everyone. I have a partial differential equation which should be equal to zero.
The code is:
syms x T
p0=1;
p1=(5*(1-x)*p0)/(5-2*x);
p2=(20*(1-x)*p0)/(5-2*x);
p3=(5*x*p0)/(5-2*x);
p4=(10*x*p0)/(5-2*x);
k1=3.87*(10^2)*exp(-(22.8*10^3)/(8.3*T));
k2=1.16*(10^8)*exp(-(114*10^3)/(8.3*T));
K1=137*(T^3.998)*exp(158.7/(8.3*T));
K2=2.5*(10^(-5))*exp(-(-32.3*10^3)/(8.3*T));
K3=5.51*(10^7)*exp(-(77.6*10^3)/(8.3*T));
r1=K2*p1*(p2^0.5);
r2=(1+K2*p1)^2;
r3=K3*(p3^2)*p4;
r4=(1+K3*p4)^2;
r5=1-(p3*(p4^2))/(p1*(p2^4)*K1);
r=((k1*r1/r2)-(k2*r3/r4))*r5;
dfT=diff(r,T);
eqn=dfT==0;
solve=solve(eqn,x);
I tried to get x in terms of T. However, the result showed 'unable to find explicit solution'
Warning: Unable to find explicit solution. For options, see help.
> In sym/solve (line 317)
I gave x an value, tring to get a set of [x,T], but the same result
dfT=diff(r,T);
dfT1=subs(dfT,x,0.5);
eqn=dfT1==0;
solve=solve(eqn,T);
Warning: Unable to find explicit solution. For options, see help.
> In sym/solve (line 317)
What's wrong with this?

 採用された回答

Walter Roberson
Walter Roberson 2022 年 8 月 9 日

0 投票

That equation is much too complex to hope for a closed form solution.
You will not be able to find a symbolic solution.
For any given T value, you might be able to find numeric solutions, possibly.

2 件のコメント

Yuang Zhang
Yuang Zhang 2022 年 8 月 10 日
Thanks!
I tried to give x and T values to get the trend of r, and found r had extreme point (maximum). But in differential equation, the result contains imaginary number. Is this wrong?
Walter Roberson
Walter Roberson 2022 年 8 月 10 日
K1=137*(T^3.998)*exp(158.7/(8.3*T));
That is going to have imaginary results for negative T.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFinancial Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by