Question: CODE USING C++ OR MATLAB WITHOUT THE NEED FOR LIBRARIES OR ADDITION SCRIPTS. PROVIDE FULL DETAILED CODE. Given function: y''-pi*y*y'=(pi^2)*(sin(pi*x)-1)*cos(pi*x), y(0)=1 y(1)=-1 exact solution is:

CODE USING C++ OR MATLAB WITHOUT THE NEED FOR LIBRARIES OR ADDITION SCRIPTS. PROVIDE FULL DETAILED CODE.

Given function: y''-pi*y*y'=(pi^2)*(sin(pi*x)-1)*cos(pi*x), y(0)=1 y(1)=-1 exact solution is: y=cos(pi*x) The program should first convert the function above into a system of equations using the central difference formulas for both the first and the second derivatives. Next the program should use the Generalized Newtons Method to solve this system with n=50 . Then the program should ask the user to input the relaxation factor, w and the tolerance e. the program should determine the number of iterations and the value of the optimal relaxation factor when e

CODE USING C++ OR MATLAB WITHOUT THE NEED FOR LIBRARIES OR ADDITION

STATEMENT: Consider the BVP given by yyy=2(sin(x)1)cos(x),y(0)=1,y(1)=1. The exact solution is y=cos(x) - Use the central difference formulas for both the first and the second derivatives and set up a system of equations. - Write up a program that uses Generalized Newton's Method to solve this system with n=50. - Your program should ask the user to input the relaxation factor, " " and the tolerance " ". - In particular, investigate the number of iterations and the value of the optimal relaxation factor when 104. SUBMISSION: You are asked to submit your code, and an output file (both in pdf format) showing: - Number of iterations, - Value of the optimal relaxation factor, - Values of x24,x35,x42, when 104. Submissions will be made via email attachments

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!