1. We discussed at length the "shooting method" for solving differential equations. Use it to solve the simple differential equation y" = y, = = = 5.81. You will need to subject to the boundary conditions (BCs) y(0) 3 and y(1) guess an initial slope y'(0). A suitable tolerance for knowing when you are close enough to the BC at x = 1 to quit is up to you but there is no need to be too stringent. Perhaps try a tolerance tol 103. The choice is up to you. By solution, I mean your code should print your final estimate of the initial slope y'(0), your computed value of y(1) to show how close you came, and a plot showing y(x) over the x-interval [0,1]. As further guidance, I recommend you insert simple code that adjusts the initial slope slightly for each iteration of calling solve ivp. An increment/decrement of ±0.1 or so may prove useful. This will save you some time guessing the initial slope.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.7: Do While Loops
Problem 6E: (Numerical analysis) Here’s a challenging problem for those who know a little calculus. The...
icon
Related questions
Question

please write the code for this problem using python in a jupyter notebook. I am stuck

1. We discussed at length the "shooting method" for solving differential equations. Use
it to solve the simple differential equation
y" = y,
=
=
= 5.81. You will need to
subject to the boundary conditions (BCs) y(0) 3 and y(1)
guess an initial slope y'(0). A suitable tolerance for knowing when you are close enough
to the BC at x = 1 to quit is up to you but there is no need to be too stringent. Perhaps
try a tolerance tol 103. The choice is up to you. By solution, I mean your code
should print your final estimate of the initial slope y'(0), your computed value of y(1) to
show how close you came, and a plot showing y(x) over the x-interval [0,1]. As further
guidance, I recommend you insert simple code that adjusts the initial slope slightly for
each iteration of calling solve ivp. An increment/decrement of ±0.1 or so may prove
useful. This will save you some time guessing the initial slope.
Transcribed Image Text:1. We discussed at length the "shooting method" for solving differential equations. Use it to solve the simple differential equation y" = y, = = = 5.81. You will need to subject to the boundary conditions (BCs) y(0) 3 and y(1) guess an initial slope y'(0). A suitable tolerance for knowing when you are close enough to the BC at x = 1 to quit is up to you but there is no need to be too stringent. Perhaps try a tolerance tol 103. The choice is up to you. By solution, I mean your code should print your final estimate of the initial slope y'(0), your computed value of y(1) to show how close you came, and a plot showing y(x) over the x-interval [0,1]. As further guidance, I recommend you insert simple code that adjusts the initial slope slightly for each iteration of calling solve ivp. An increment/decrement of ±0.1 or so may prove useful. This will save you some time guessing the initial slope.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer