1. Linear Shooting Method for a Two-point Boundary Value Problem
(A) Consider the differential equation
yJJ = yJ + 2y + cos(x), for 0 ≤ x ≤ π ,
with boundary conditions
y(0) = −0.3, y π = −0.1.
Show that the exact solution is
y(x) = −(sin(x) + 3 cos(x))/10.
Implement the shooting method for this problem in Matlab. Use Matlab solver ode45, with your choice of error tolerance. You can check your answer by comparing it with the exact solution. Plot your solution, and also the error.
(B) Consider the two-point boundary value problem for the unknown u(x)
−uJJ + 3u = x(1 − x), u(0) = 0, u(1) + uJ(1) = 1.
Explain in detail how to solve this problem with the shooting method.
2. Non-linear Shooting Method for a Two-point Boundary Value Prob- lem
Consider the differential equation
yJJ = −(yJ)2 − y + ln(x), 1 ≤ x ≤ 2 with the boundary conditions y(1) = 0, y(2) = ln 2.
Show that the exact solutions is y(x) = ln x.
Implement the shooting method for this problem in Matlab. Use Matlab solver ode45. Note that this is a non-linear problem, so you need to use a secant iteration. Since the secant iteration converges quickly if the initial guess is good, it is crucial to get a good initial guess. Try the values z1 = 1, z2 = 0.5.
You may choose the tolerance to be 10−9, and maximum number of iterations for the secant method to be 5. Plot the approximate solutions together with the exact solution. Plot also the error.
3. Finite Difference Method in 1D
Consider the same equation as in Problem 1A. We will now compute approximate solu- tions with the finite difference method.
(a). Consider a uniform grid with h = (b − a)/N . Set up the finite difference method for the problem. Write out this tri-diagonal system of linear equations for yi.
(b). Write a Matlab program that computes the approximate solution yi. You may either use the Matlab solver to solve the linear system, or use the code for tri-diagonal systems (you should find it in a previous homework). Test your program for N = 10 and N = 20. Plot the approximate solutions together with the exact solution. Plot also the errors.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme