Partial preview of the text
Download The Importance of Happiness in Life's Purpose and more Exercises Ethics in PDF only on Docsity!
Question
Answer
“WHAT EVER YOU DO, ALWAYS CHOOSE WHAT MAKES YOU HAPPY” Question Machine Exercise: a. Make an Algorithm for interpolating, approximating, and root-finding using the methods below: « Lagrange's Method + Newton's Method Neville's Method Interpolation with Cubic Spline + Linear Fit Polynomial Fit Exponential Fit + Bisection Method + False Position and Secant Methods + Newton-Raphson Method b. Solve the following problems (you can use hand calculation) 1. Use Lagrange interpolation and Newton interpolation methods to find a cubic polynomial that interpolates the following data points: {(-2, -3), (-1, 1), (0, -1), (1, -3)}. After applying each of these methods, convert the polynomial to the standard form P(x) = ag + a4x + aox? + a3x? (if it is not already in this form). 2. Given the set of data points {(-3, -1), (-2, 1), (O, 2), (1, 3), (3, 2)}, fit a straight line y = mx + b that approximates the points in the least-squares sense. (a) Write a least-squares system Ax = b which can be used to obtain values for m and b. (b) Solve the obtained system above using the method of normal equations. Answer “THE PURPOSE OF LIVES IS TO BE HAPPY, SO ENJOY EVERYTHING”