how to solve system of nonlinear equation

1 回表示 (過去 30 日間)
Monirul Hasan
Monirul Hasan 2019 年 1 月 31 日
コメント済み: Stephan 2019 年 1 月 31 日
I have a set of nonlinear equation as
-(C1+C2)*x+C3*y-C4*x*y+1/4*C5*y^2+C6 = 0,....(1)
C2*x-(C3+C7)*y-5/4*C5*y^2+3*C6 = 0;.....(2)
I have all the constant values as, C1 = 3.2e7; C2 = 3.1e7; C3 = 5.6e3; C4 = 2e-11; C5 = 5e-15; C6 = 1.04e20; C7 = 8.2e2;
I have already used 'fsolve' with intilal guess [ 1e13 3e16], but it showed 'no solution found'. Please let me know if I have to change my guess or any other way to solve this. I have attached the code as well. Thanks.

採用された回答

Stephan
Stephan 2019 年 1 月 31 日
Hi,
vpasolve finds 3 solutions:
syms Ns0 Nt0
k_rs = 3.2e7;
k_ISC = 3.1e7;
k_RISC = 5.6e3;
k_ST = 2e-10;
k_TT = 5e-15;
k_NRT = 8.2e2;
d = 15e-7;
J = 0.1;
e = 1.6e-19*1e3;
eq1 = -(k_rs+k_ISC)*Ns0+k_RISC*Nt0-k_ST*Ns0*Nt0+0.25*k_TT*Nt0.^2+J/(4*d*e)==0;
eq2 = k_ISC*Ns0-(k_RISC+k_NRT)*Nt0-1.25*k_TT*Nt0.^2+(3*J)/(4*d*e)==0;
sol = vpasolve([eq1, eq2], [Ns0, Nt0]);
sol_Ns0 = sol.Ns0
sol_Nt0 = sol.Nt0
Best regards
Stephan
  4 件のコメント
Monirul Hasan
Monirul Hasan 2019 年 1 月 31 日
Thanks a lot Stephan. It worked. I am accepting your answer. I am going work some more on that code. If you are ok, I might ask for some additional help on that as well.
Stephan
Stephan 2019 年 1 月 31 日
Feel free to ask more questions. Usually i unfollow questions, that have been solved so far. So it is a good idea to open a new question, if you have issues. Also new and unanswered questions are usually answered very quickly by Madhan Ravi ;-)
He has very good knowledge about Symbolic calculations in Matlab.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by