Question: assignment is to implement a shooting method to solve this nonlinear boundary value problem. In doing so, we make use of methods developed to solve

 assignment is to implement a shooting method to solve this nonlinear

assignment is to implement a shooting method to solve this nonlinear boundary value problem. In doing so, we make use of methods developed to solve nonlinear equations and initial value problems. 3.1. Let yi = , = y, and ys = y". Write the third-order nonlinear ODE (3.1) as a system of three first-order ODE y, ry, ). Write a MATLAB function that calculates f(y, ) (it needs only one-three lines of active code in addition to the function header). The function must have the interface function dydt skan(y, beta) where dydt is the column vector of time-derivatives fly. ), y is the column vector y, and beta-3. Save the function as f8kan.n. 3.2. The system of first-order ODEs derived in Part 3.1 must be solved subject to the boundary conditions (3.2). From these boundary conditions, we know that yl (0)-92(0) = 0. If we knew y3(0) then we would have an initial value problem that could be solved using straightforward ODE schemes. But we do not know ys(0) Instead, we need to satisfy y2(T) = l. The idea behind shooting is to guess a value for ya(0), say r, then integrate from t 0 to t = T, aiming for the computed value of 2(T-l. If 2(T)1, then we adjust r and try again. We use Newtonlike iteration to do this adjustment, and to do so we need to create a function that calculates the residual 2(T) 1 for any given r Write a MATLAB function that uses ode23) to integrate the system of ODEs derived in Part 3.1 subject to the initial conditions y(0) 0) 0 and ys(0)r and returns the value of y2(T-1 it needs only two lines of active code in addition to the function header). As usual, test your code as a script before wrapping it up, as a function. Your function must have the interface function refskanResidual (x, T. beta) where res is the (scalar) value of y2(T)- 1, x is the guessed initial value ys(0). Save the function as fskanResidual.n Recall that ode23 (e(t,y) fskan(y, beta)... invokes ode230 to integrate an anonymous oneline function with two variables, (t,y), and which evaluates fskanO at y with specified parame- ter beta 3.3. The value of r is to be found using Newton-like iteration to solve f(z) = 0 where f(z) = fskanResidual (x,T, beta) for parameters specified by you Write a script that solves the boundary value problem (3.1)-(3.2) Your script must: assignment is to implement a shooting method to solve this nonlinear boundary value problem. In doing so, we make use of methods developed to solve nonlinear equations and initial value problems. 3.1. Let yi = , = y, and ys = y". Write the third-order nonlinear ODE (3.1) as a system of three first-order ODE y, ry, ). Write a MATLAB function that calculates f(y, ) (it needs only one-three lines of active code in addition to the function header). The function must have the interface function dydt skan(y, beta) where dydt is the column vector of time-derivatives fly. ), y is the column vector y, and beta-3. Save the function as f8kan.n. 3.2. The system of first-order ODEs derived in Part 3.1 must be solved subject to the boundary conditions (3.2). From these boundary conditions, we know that yl (0)-92(0) = 0. If we knew y3(0) then we would have an initial value problem that could be solved using straightforward ODE schemes. But we do not know ys(0) Instead, we need to satisfy y2(T) = l. The idea behind shooting is to guess a value for ya(0), say r, then integrate from t 0 to t = T, aiming for the computed value of 2(T-l. If 2(T)1, then we adjust r and try again. We use Newtonlike iteration to do this adjustment, and to do so we need to create a function that calculates the residual 2(T) 1 for any given r Write a MATLAB function that uses ode23) to integrate the system of ODEs derived in Part 3.1 subject to the initial conditions y(0) 0) 0 and ys(0)r and returns the value of y2(T-1 it needs only two lines of active code in addition to the function header). As usual, test your code as a script before wrapping it up, as a function. Your function must have the interface function refskanResidual (x, T. beta) where res is the (scalar) value of y2(T)- 1, x is the guessed initial value ys(0). Save the function as fskanResidual.n Recall that ode23 (e(t,y) fskan(y, beta)... invokes ode230 to integrate an anonymous oneline function with two variables, (t,y), and which evaluates fskanO at y with specified parame- ter beta 3.3. The value of r is to be found using Newton-like iteration to solve f(z) = 0 where f(z) = fskanResidual (x,T, beta) for parameters specified by you Write a script that solves the boundary value problem (3.1)-(3.2) Your script must

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!