First of all, I'd like to mention that an important tool that I use is WolframAlpha. It makes it easy to find any solution to a problem so that you at least have an idea what it is that you are aiming for. In the case of this problem I made the input:
e^x-3x^2=0
and received 3 answers
0.910008
-0.458962
3.373308
since we are dealing with the interval [0,1] we are obviously looking to achieve the value 0.910008.
now, when inputting into excel I have:
| a0 | b0 | f(a0) | f(b0) | c0 | f(c0) |
| 0 | 1 | =EXP(A2) - 3*(A2^2) | =EXP(B2) - 3*(B2^2) | =((D2*A2) - (C2*B2)) / (D2-C2) | =EXP(E2)-3*(E2^2) |
the value of c0 is the root of the secant line and is expressed by (s: wikipedia):
at this point we have to check signs
=IF(SIGN(C2)=SIGN(F2); E2; A2) for a0 and
=IF(SIGN(D2)=SIGN(F2); E2; B2) for b0
at this point, the cells can simply be extended and the answer should be filled out. By the 8th iteration the answer should match up.
No comments:
Post a Comment