Do all problems on the pages that
follow.
1
Assignment 5:
email programs and output to:
[email protected]
due Tues 4/20/10 9:50AM
hand in other material in class
Tues 4/20
(or email)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Programming problem 1.
Find on the next page an outline for a C program that solves two nonlinear
equations
f
1
(x,y)
=
0
f
2
(x,y)
=
0
for x and y using the NewtonRaphson method.
Complete this program and obtain the solution to the given equations.
Your
program output should
resemble
the format given below.
You need print the
solution
and corresponding function values only at the final iteration when either
the solution is obtained or the maximum number of iteration is exceeded with no
solution.
Exercise the program to show these two cases.
2
Sample program output:
(when program converges)
Please enter initial approximations close to solution!
For this EXAMPLE type : 2.0 0.25
2 .25

The initial approximation are : 2.000000 0.250000

At the iteration number
….
:
x = …
y = …
The function values are : 0.000000 0.000000

The solution was found with the desired tolerance !
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 SussmanFort
 Calculus, Natural number, Prime number, enter initial approximations, iteration number ….

Click to edit the document details