Sameeksha_Math_project1

pdf

School

Indiana University, Purdue University, Indianapolis *

*We aren’t endorsed by this school

Course

414

Subject

Mathematics

Date

Feb 20, 2024

Type

pdf

Pages

8

Uploaded by MajorInternetKookabura46

Report
Sameeksha Desai Page 1 of 8 Mathematics 41400 Fall 2023 PROJECT - 1 Name: Sameeksha Desai University ID: 2001289888 Subject: Mathematics 41400 Professor: Luoding Zhu Write a program to solve a scalar equation f(x)=0 by Newton's method. (you might want to use the pseudocode on the book). Use your program to compute the root for each of the four equations in problem 10 on Page 139. Please upload a PDF file of your program together with a sequence of approximation to the root: X0,X1,X2,...,Xn, and the residual of the equation f(Xn), i.e. f(x0), f(x1), f(x2), .... for each of the problem(for output format see example on page 128 of the text). The residual of the equation f(Xn) should be extremely small if not zero. Otherwise, Newton's method fails and you may need to choose a different X0. Note: 1) If the language you use has a function or subroutine for computing the first derivative of a given function, you can use that function or subroutine. If not, you may compute the derivative by hand and plug it into your code, just as you do for the function itself. 2) 2)the values of nmax, delta, and epsilon in the text are your choices. You can play with them, but to begin with, you could choose nmax=1000, delta=10^-4; epsilon=10^-6.
Sameeksha Desai Page 2 of 8 a) CODE:
Sameeksha Desai Page 3 of 8 OUTPUT:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Sameeksha Desai Page 4 of 8 b) CODE:
Sameeksha Desai Page 5 of 8 OUPUT:
Sameeksha Desai Page 6 of 8 c) CODE:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Sameeksha Desai Page 7 of 8 OUPUT:
Sameeksha Desai Page 8 of 8 d) CODE: OUPUT: