# Write down the vector approximating f ′′ x at...

• Homework Help
• 6

This preview shows page 1 - 2 out of 6 pages.

Math 307: Problems for section 1.3 1. Write down the vector approximating f ′′ ( x ) at interior points, the vector approximating xf ( x ) at interior points, and the finite difference matrix equation for the finite difference approximation with N = 4 for the differential equation f ′′ ( x ) + xf ( x ) = 0 for 1 x 3 subject to f (1) = 1 , f (3) = - 1 . 2. Write down the matrix equation to solve in order to find the finite difference approxima- tion with N = 4 for the same differential equation f ′′ ( x ) + xf ( x ) = 0 for 1 x 3 but now subject to f (1) = 1 , f (3) = - 1 3. Use MATLAB/Octave to solve the matrix equations you derived in the last two prob- lems for the vector F that approximates the solution (i.e., with N = 4 ). Then redo the calculation with N = 50 and plot the resulting functions. Questions 4–6 deal with the steady heat equation in a one-dimensional rod considered in the notes: 0 = kT ′′ ( x ) - HT ( x ) + S ( x ) , where k and H are constants, subject to the boundary conditions T = T l at x = x l and T = T r at x = x r . The MATLAB/Octave commands needed to find the finite difference approximation for T ( x ) in the case k = 1 , H = 0 , S ( x ) = 1 , T l = T r = 1 , x l = 0 and x r = 1 are provided in heat.m . 4. Modify the commands provided in heat.m to calculate the temperature profile in a rod cooled by the air in the case k = 1 , H = 1 , S ( x ) = 1 , T l = 0 , T r = 2 , x l = - 1 and x r = 1 . Describe briefly the modifications made, and hand in a plot of the solution for n = 50 . 5. For the case given in Q4, compute the finite difference approximation at x = - 0 . 5 for n = 4 , 40 and 400 . The true solution at this point is 1 - sinh 0 . 5 / sinh 1 . Make a log-log plot of the magnitude of the error in the finite difference approximation against Δ x . What is the approximate slope of this curve? 1