Download presentation
Presentation is loading. Please wait.
Published byΚλήμης Αποστολίδης Modified over 5 years ago
1
Assignment 1: due 1/17/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical estimates. Hand in copies of your graph and the command window where the functions were called and zeros returned.
2
Assignment 2, Due 1/22/19 f(x) = ex - 3x2 has a zero in the interval [-1, 0]. Modify your Newton’s method code to return convergence data as log10(re). Use plot to compare the rates of convergence to the root with initial guesses 0 and -1. Verify that both initial guesses converge to the same zero. Hand in a copy of command window where Newton’s method was called Hand in your plot with labels (by hand is OK) on axes and curves to show which curve goes with which initial guess.
3
Assignment 3, Due 1/24/19 Write bisection function that finds root and saves convergence data Use code to find the zero f(x) = ex - 3x2 in the interval [-1, 0]. On a semi-log plot, compare the rate of convergence of the bisection method with starting interval [-1,0] to that of Newton’s method with initial guesses -1 and 0. Verify that Bisection and Newton’s method converge to the same zero. Hand in a copy of the command window where functions were called. Hand in a plot of the convergence data for bisection and Newton’s method with axes and curves labeled.
4
Assignment 4, Due 1/29/19 Write secant function that finds root and saves convergence data Use code to find zero f(x) = ex - 3x2 in the interval [-1,0]. On a semi-log plot, compare the rate of convergence of the secant method to that of the bisection method with the same starting values [-1,0] and to Newton’s method with initial guesses -1 and 0. Hand in a copy of the command window where you verified that all methods converged to same zero. Hand in a plot of the convergence data for secant, bisection, and Newton’s method with axes and curves labeled.
5
Assignment 5, Due 1/31/19 On page 242 of the text (6th edition), the value of is given as , which can be taken as the “exact” value. Estimate this integral by the trapezoid rule with 10 points when the points are chosen in the following ways: 1. Equally spaced on [1, 3] 2. xk = exp(yk) where yk= linspace(0,ln(3),10) 3. Equally spaced on [0, ln(3)] in the new integration variable y = ln(x). Calculate the percent difference from the exact value in each case
6
Assignment 6, Due 2/7/19 Estimate an upper bound on the absolute error in approximating by the composite trapezoid rule with 10 points. Show a plot to determine the maximum absolute value of the second derivative of the integrand. Assume the exact value is What is the actual absolute error in this trapezoid rule approximation?
7
Assignment 7, Due 2/14/19 Find A and B as a function of a and b by requiring formula to be exact for f(x) = 1 and f(x) = x.
8
Assignment 8, Due 2/14/19 Approximate the integral by the trapezoid and Simpson rules with 3, 5, and 7 equally spaced points on [1,3]. Calculate the percent difference from the “exact” value, , in each case.
9
Assignment 9, Due 2/21/19: Write a MatLab code for Gauss quadrature with 2, 3, 4 and 5 points. Make a table that includes the estimated value and percent difference (100|(exact-estimate)/exact| in Gauss quadrature when the integrand is evaluated at 2, 3, 4, and 5 points. Take as the exact value. Compare results with 3 and 5 points to results from HW 8 for trapezoid and Simpson’s rule. Quiz #2: numerical integration: 3/7/18
10
Assignment 10, Due 2/26/19: Approximate integral in x variable by Guass quadrature with 2, 3, 4, and 5 points Approximate integral in y variable by Laguerre quadrature with 2, 3, 4, and 5 points Report your results as a table with approximate values and percent difference from exact.
11
Assignment 11 Due Problems from the text 6th edition p69 p70 a, b, and c p70
12
Use Euler’s method to solve
Assignment 12, Due 3/21/19: Use Euler’s method to solve x’ = 1 + x2 + t3 for x(t=2) given x(t=1) = -4 using 10 points. Plot result. Display t(npts) and x(npts). Calculate percent difference of x(npts) from “exact” value x(t=2) = (text p434) Repeat with Extended Euler method
13
on independent variable t and that x’ = t2 + x3 ,
Assignment 13, Due 3/21/19: Given that unknown function x has both explicit and implicit dependence on independent variable t and that x’ = t2 + x3 , Calculate by hand x’’(t,x), x’’’(t,x) and x(4)(t,x). Show all steps
14
Assignment 14 due 3/26/19 Use ode45 to solve x’ = 1 + x2 + t3 for x(t=2) given x(t=1) = -4. Use the same number of points as ode45 to solve for x(t) by Euler and extended Euler methods. In all 3 cases, calculate the percent difference from the exact value x(2) = on p434 of text
15
Assignment 15, Due 4/2/19: Solve the system of equations x’=x – y + 2t – t2 – t3 y’=x + y – 4t2 + t3 for 0 < t < 3, subject to the initial condition x(0)=1, y(0)=0 Use Eulersys, ex_Eulersys, and ode45 with the same number of points Exact solutions are x(t)=exp(t)cos(t) + t2 and y(t)=exp(t)sin(t) - t3 For each method: Print out the values of x and y at t=3, Calculate the percent difference from the exact values at t=3 Make separate plots for each method that compare your results to the exact solution Make sure your plots can distinguish exact from numerical results)
16
Use your Cholesky factorization code to solve Ax = b where
Assignment 16, Due 4/11/19 Write a MATLAB codes for forward substitution, backward substitution and Cholesky factorization. Use the MATLAB function lu(A) and your forward and backward substitution codes to solve Ax = b where A = and b = Use your Cholesky factorization code to solve Ax = b where and b = A = Test your results using MatLab’s method x = A\b. Hand in copies of your codes and the command window where they were called.
17
Assignment 17 due 4/18/19 Use normal equations to fit a parabola to the data set t=linspace(0,10,21) y=[2.9, 2.7, 4.8, 5.3, 7.1, 7.6, 7.7, 7.6, 9.4, 9, 9.6,10, 10.2, 9.7, 8.3, 8.4, 9, 8.3, 6.6, 6.7, 4.1] with weights that the reciprocal of the square of the uncertain in y, which is 10% of the value of y. Plot the data with error bars and the fit on the same set of axes. Use MatLab’s errorbar(t,y,dy,’*’) function. Show the optimum value of the parameters and calculate the sum of squared deviations between fit and data.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.