Question: I need help, this in C++ please!! Thank You this is code for newtons method however i need it in c++ function iterFunc(x) { }

I need help, this in C++ please!!

Thank You


function iterFunc(x) { } return x (-x^4+ 3*x^2 + 2)/(-4*x^3+ 6*x) #Change

this is code for newtons method however i need it in c++


 

function iterFunc(x) { } return x (-x^4+ 3*x^2 + 2)/(-4*x^3+ 6*x) #Change depending on specific function oldest = 1 tol = 0.000000005 n = 0 nmax 50 error =1 while (error tol and n < nmax) { newEst iterFunc(oldEst) print(newEst) error math.abs(newEst oldEst newEst n n+1 - oldest) # Change if a better initial guess is available # Change depending on the tolerance desired # Initial number of iterations done #Maximum number of iterations #Error must be initialized to start the loop. #will stop if error = nmax # Create new estimate, x_i+1 #Error based on stopping criterion # Iterate loop count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Heres the equivalent code for Newtons method in C based on the provided pseudocode cpp inc... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!