# Solving an implicit equation (iteration)

25 Ansichten (letzte 30 Tage)
Hammaad Shafi am 9 Feb. 2022
Kommentiert: Hammaad Shafi am 10 Feb. 2022
I'm stuck at this question which is part of our chemical engineering comp lab. thanks in advance for your help.
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

AndresVar am 10 Feb. 2022
The formula has the form of an atracting fixed point if it looks like A=f(A) (and other conditions see the links below), then you can find the value of A by guessing an initial value A1:
A2=f(A1)
then try again
A3=f(A2)
and so on..
A(n+1)=f(A(n))
...
Eventually A(n) = A(n+1) and that's the fixed point solution.
In matlab you can make a function
function Phi2 = Phif(Re,Phi1)
% note the eq(3) is not quite Phi2=Phif(Re,Phi1), but ALMOST, just needs a
% little one step tweak
end
then call this function many times. The first call you guess a value, for the next calls you use the Phi2 output.
Instead of writing many calls just put the call in a loop and make the loop break when Phi1 is close enough to Phi2 (for example their absolute difference is very small)
when you get your asnwer, verify it by pluggin it in.
See:
##### 1 Kommentar-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden
Hammaad Shafi am 10 Feb. 2022
thank you for the response. I am still struggling on how to tweak equation 3 and how to start implementing the loop

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Chemistry finden Sie in Help Center und File Exchange

R2020b

### Community Treasure Hunt

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

Start Hunting!

Translated by