100% Guaranteed Results


CS6210 – Solved
$ 20.99
Category:

Description

5/5 – (1 vote)

CS 6210: Advanced Scientific Computing I
Assignment 5
Note: Please do your programming in Matlab and document thoroughly!
Instructions
1. Simpson’s Rule, for integrating a function is given by
𝑏 𝑁
∫ 𝑓(π‘₯)𝑑π‘₯ β‰ˆ βˆ‘ 𝑀𝑖𝑓(π‘₯𝑖)
π‘Ž 𝑖=1
Implement or use the given quadratic interpolant (composite Simpson formula) for 𝑁 =
17,33,65,129,257,513. Test your code on the interval [0,1] with the functions xp p = 2,3,4,5,6 and 8 and show and explain the results.

Calculate the integral for the function below.
(4π‘₯) 𝑑π‘₯
3
β€’ Report the results and create a convergence table for Simpson’s Rule t for 𝑁 = 217,33,65,129,257,513 that shows how quickly the methods go to a common final value.
2. Using the supplied QuadTX functions from the book calculate the integral defined by
03(cos( ))x3 200dx use tolerances 1.0e-7, 1.0e-8, ….. 1.0e-14 and compare the time spent and the number of functions calls of f(x) used.
3. Change your fixed grid code to estimate the overall error by repeating the calculation for the function in Question 4 and compare the performance of Quadtx with your fixed grid
4. Solve the following problem that concerns a model of a coffee cup problem analytically for 5 minutes based upon Newton’s law of cooling: 𝑑 𝑑𝑑𝑇𝑐 = βˆ’π‘Ÿ(𝑇𝑐 βˆ’ 𝑇𝑠), 𝑇𝑠 = 19℃, 𝑇𝑐(0) = 84℃, π‘Ÿ = 0.025/π‘ π‘’π‘π‘œπ‘›π‘‘.

Write a program to solve the coffee cup problem using the Forward Euler Method calculate and compare your results to the analytical answer given by the provided function.
Plot the results for all algorithms using several different values for the step size β„Ž (β„Ž = 30𝑠, 15𝑠, 10𝑠, 5𝑠, 1𝑠, 0.5𝑠, 0.25𝑠)
Using these results estimate the order of the error after the first step and at the end of the integration. Describe how the error changes with changes in β„Ž.
5. Implement the ODE23 method described in the book Moler for the coffee cup problem .. For the standard equation dy/dt = f(t,y) the method is given by
S1 = f(tn,yn)
S2 = f(tn + h/2, yn+h/2 S1) S3 = f(tn + 3h/4, yn+3h/4 S2) tn+1 = tn + h yn+1 = yn + h/9 ( 2S1 + 3S2 + 4S3)
S4 = f(tn+1, yn+1)
Error(n+1) = h/72 ( -5S1 + 6S2 + 8S3 -9 S4)
6 Plot the results for this algorithms using several different values for the step size β„Ž (β„Ž =
30𝑠, 15𝑠, 10𝑠, 5𝑠, 1𝑠, 0.5𝑠, 0.25𝑠) Using these results estimate the order of the error after the first step and at the end of the integration. Compare the actual error on the first timestep with the predicted error on the first step.
7 Change the value of r in the problem being solved to r = 0.6. Does the error estimator blow up in the same way as the solution when the solution becomes unstable?
8 Modify the Harmonic Oscillator code on the canvas page to include the Stormer Verlet method. Include code to measure the error in the Hamiltonian. Verify the class results for these methods.
9 Further modify the code to include the trapezoidal method and the Backward Euler method by using the inverse of a 2×2 matrix as was done in the class notes. Are these methods area preserving as defined in the slides? Explain your results using the approach adopted in the slides.

What to turn in
For these assignments, we expect both SOURCE CODES and a written REPORT be uploaded as a zip or tarball file to Canvas.
β€’ Source code for all programs that you write, thoroughly documented.
o Include a README file describing how to compile and run your code.
β€’ Your report should be in PDF format and should stand on its own.
o It should describe the methods used. o It should explain your results and contain figures. o It should also answer any questions asked above.

Reviews

There are no reviews yet.

Be the first to review “CS6210 – Solved”

Your email address will not be published. Required fields are marked *

Related products