How to solve an equation which includes iteration/summation and with a mixed unknown variable ?

36 views (last 30 days)
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 Comment
Rik
Rik on 24 Jan 2023
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.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 12 Apr 2022
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 Comments
Walter Roberson
Walter Roberson on 12 Apr 2022
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_
numer = 
denom = 1 + exp((E__OC_PE - E_0_PE_) .* alpha_PE_ .* e ./ (k .* T))
denom = 
eqn = chi_PE == sum( numer ./ denom)
eqn = 
sol = solve(eqn, E__OC_PE)
Warning: Unable to find explicit solution. For options, see help.
sol = Empty sym: 0-by-1
Whereas if you had specific numeric values for the variables then you would probably be able to vpasolve()

Sign in to comment.

More Answers (1)

Sam Chak
Sam Chak on 12 Apr 2022
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.

Categories

Find more on Programming in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!