Page 1 of 1

A statement of collaboration is required. For this assignment, uses of Matlab built-in functions for solving boundary va

Posted: Mon May 02, 2022 3:49 pm
by answerhappygod
A Statement Of Collaboration Is Required For This Assignment Uses Of Matlab Built In Functions For Solving Boundary Va 1
A Statement Of Collaboration Is Required For This Assignment Uses Of Matlab Built In Functions For Solving Boundary Va 1 (95.8 KiB) Viewed 32 times
A statement of collaboration is required. For this assignment, uses of Matlab built-in functions for solving boundary value problems, such as bvp4c and bvpinit, are NOT allowed. Otherwise, you may use Matlab functions such as backslash ("\") or inv to solve a system of linear equations or invert a matrix. Note: For any sinusoidal functions you might encounter in this homework, the argument of the function is always in radian. Problem 1 (5 points) Consider the following boundary value problem for u(x) defined on the interval of 0<x<1, u" + 9u = 0, u(0) = 0.5 u'(1) = 0 . ("prime" is differentiation with respect to x, "d/dr") Note that the boundary condition at x = 1 is imposed on the derivative of u. (a) Find the analytic solution, which will be used to validate the numerical solutions. (You may use any methods/tools to obtain the analytic solution, but please describe in the report how the solution is obtained.) (b) Solve the BVP using the finite-difference method. Specifically, use the 3-point second-order central difference formula to approximate the second derivative in the ODE: u,">(u 1-2 u,+ u://(Ax)?). For the boundary condition at x = 1, use the 2-point first-order backward finite difference formula to approximate the first derivative: u;'=(4,-4,-1)(Ax). Obtain the numerical solution for the two cases: (1) Ar=0.2, (II) Ar = 0.05. Plot the analytic solution and two numerical solutions over the interval of 0 <x< 1. Collect all three curves in one plot and clearly label the curves.