Using MATLAB: Consider the following Boundary Value Differential Equation: y''+4y=0 y(0)=-2 y(Ï€/4)=10 Which has the exact solution: y(x)= -2cos(2x)+10sin(2x) Create a...

60.1K

Verified Solution

Question

Advance Math

Using MATLAB:

Consider the following Boundary Value Differential Equation:

y''+4y=0

y(0)=-2

y(Ï€/4)=10

Which has the exact solution: y(x)= -2cos(2x)+10sin(2x)

Create a program that will allow the user to input the step size(in x), and two guesses for y'(0). The program will then use theEuler method along with the shooting method to solve this problem.The program should give the true error at y(π/8). Run your codewith step sizes of π/400 and π/4000 and compare the errors. Choseany guesses for y'(0) that are reasonable. Also list the two errorsyou calculated.

Answer & Explanation Solved by verified expert
4.2 Ratings (930 Votes)
For step size 0007854 error in Euler method at xpi8is 2899593e02For step size 0000785 error in Euler method at xpi8 is3001448e03Matlab code using Euler method for 2nd order differentialequationclear allclose allProgram for Euler method for    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students