How to solve an equation which includes iteration/summation and with a mixed unknown variable ?
8 ビュー (過去 30 日間)
古いコメントを表示
I am trying to solve equation for "Epe(OC)" the first term in exponential, i am using "solve()" to write it in unknown variable form, and it gives me result, however I am not getting a way to solve it in the form of summation, anyone if guide how to solve this type of equation will be great favor.
1 件のコメント
Rik
2023 年 1 月 24 日
I recovered the removed content from the Google cache (something which anyone can do). Editing away (part of) your question is very rude. Someone spent time reading your question, understanding your issue, figuring out the solution, and writing an answer. Now you repay that kindness by ensuring that the next person with a similar question can't benefit from this answer.
採用された回答
Walter Roberson
2022 年 4 月 12 日
Do not try to solve it in terms of a summation. Instead, construct a ./ ratio of vectors (the terms with all the varying i values) and sum() those to get a definite sum. Or just write out the definite sum, it should not be long.
So you will get something of the approximate form A1/B1 + A2/B2 + A3/B3 + A4/B4.
Now you can try to solve() that. You might get lucky enough for there to be a solution involving Wright Omega function... but I suspect not. solve() will probably give up if the coefficients are symbolic; if the target variable is the only variable then solve will probably use vpasolve()
2 件のコメント
Walter Roberson
2022 年 4 月 12 日
Guessing that is
N = 4;
syms E__OC_PE e k T chi_PE Delta
syms alpha_PE_ [1 N]
syms x_PE_ [1 N]
syms E_0_PE_ [1 N]
numer = Delta*x_PE_
denom = 1 + exp((E__OC_PE - E_0_PE_) .* alpha_PE_ .* e ./ (k .* T))
eqn = chi_PE == sum( numer ./ denom)
sol = solve(eqn, E__OC_PE)
Whereas if you had specific numeric values for the variables then you would probably be able to vpasolve()
その他の回答 (1 件)
Sam Chak
2022 年 4 月 12 日
Hi @IQRA KIRAN
Not exactly sure how your summation look like. Maybe the LaTeX code is incorrectly entered.
Anyhow, if you looking to find the root of the equation, for example
then you can try something like this:
n = 1 : 4;
f = @(x) sum(n./(1 + exp(x - n))) - 5; % function to be solved
x0 = 2; % initial guess
x = fzero(f, x0) % root-finding solver
x =
3.0399
Hope this is helpful to give you some insights on how to enter the summation that you desire.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!