Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. (20 pts) Code in MATLAB. The Taylor series of degree n for f(z) = ez is - i=0

ID: 1717921 • Letter: 3

Question

3. (20 pts) Code in MATLAB. The Taylor series of degree n for f(z) = ez is - i=0 Use this polynomial in the following two methods with only four digits of precision (chopping) to find an approximate value of e Note that the true value to four digits of precision is 1.832 x 10-2. Which formula gives more accurate results and why? i=0 0 -0 4. (20 pts) Code in MATLAB. Determine the real root of f(z) = Inx a. Using bisection to locate root. Employ interval [0.5, 5] and iterate until error (E) falls below 0.1 b. Perform the same computation as in a. but use the secant method. Start the computation with values of 10-0.5 and x = 5.0 5, (30 pts) Derive the Newton method (k = 0) and the Halley method (k-1) to solve Kepler equation, M-E-e sin E (that is, find E given M and e), using the Generalized Halley method dzk+1

Explanation / Answer

Matlab Code

formula1 = 0;
formula2 = 0;
for i=0:7
    formula1 = formula1 + (-4)^i / factorial(i);
    formula2 = formula2 + (4)^i / factorial(i);
end
disp(formula1)
disp(1/formula2)

Result
   -1.0952

    0.0193

formula b gives more accurate results

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote