0% found this document useful (0 votes)
33 views1 page

2nd Assigment: Numerical Computation (TKU 602/S-2) Instructor: DR - Eng. Sunu Wibirama, S.T., M.Eng

This document provides instructions for a numerical computation assignment that must be submitted to Dr. Sunu. It includes two problems - a pen-and-paper problem comparing the number of iterations for Newton's method to compute two roots of a function, and a programming problem to write a MATLAB function that implements the bisection method and uses it to find the root of a given function. The report must be handwritten for the pen-and-paper problem and printed for the programming problem, and submitted before next week's class.

Uploaded by

Ilcham Lynx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views1 page

2nd Assigment: Numerical Computation (TKU 602/S-2) Instructor: DR - Eng. Sunu Wibirama, S.T., M.Eng

This document provides instructions for a numerical computation assignment that must be submitted to Dr. Sunu. It includes two problems - a pen-and-paper problem comparing the number of iterations for Newton's method to compute two roots of a function, and a programming problem to write a MATLAB function that implements the bisection method and uses it to find the root of a given function. The report must be handwritten for the pen-and-paper problem and printed for the programming problem, and submitted before next week's class.

Uploaded by

Ilcham Lynx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

2nd Assigment

Numerical Computation (TKU 602/S-2)


Instructor: Dr.Eng. Sunu Wibirama, S.T., M.Eng.
You can use Bahasa Indonesia to answer this assignment. Dont forget to
put your name and your student number in the report. The report should
be submitted in hand-written (for pen-and-paper problem) and printed (for
programming problems) next week, direct submission to Dr. Sunu before the
class begins.

0.1

Pen-and-paper problem (F4 paper with line)

f (x) = (x+1)3 (x1) obviously has roots at x = 1 and x = +1. Using starting
values that differ from the roots by 0.1, compare the number of iterations taken
when Newtons method computes both of the roots until they are within 0.0001
of the correct values.

0.2

Programming problem (A4 paper)

1. Write a MATLAB user-defined function that solves for a root of a nonlinear equation f (x) = 0 using the bisection method. Name of the function
is: Xs = BisectionRoot(Fun,a,b)
The output argument Xs is the solution. The input argument Fun is a
name for the function that calculates f (x) for a given x (it is a dummy
name for the function that is imported into BisectionRoot); a and b are
two points that bracket the root. The iterations should stop when the
tolerance  in f (x) is smaller than 0.000001. Note that  is difference between true soluton f (XT S ) and numerical solution f (XN S ):
T oleranceInf = |f (XT S ) f (XN S )| = |0 | = ||
The program should check if points a and b are on opposite sides of the
solution. If not, the program should stop and display an error message.
2. Use the function BisectionRoot to determine the roots of
f (x) = x 2ex (start with a = 0 and b = 1). What is the result?

You might also like