Question

Q4. Obtain a fourth order of accuracy approximation formula for (0). You can make use of MATLAB software to find the unknow

Q4. Obtain a fourth order of accuracy approximation formula for y'' (0). You can make use of MATLAB software to find the unknown coefficients

0 0
Add a comment Improve this question Transcribed image text
Answer #1

y(0)=0,

y(π/2)−2=0.

The corresponding function is

function res = bcfcn(ya,yb)
res = [ya(1)
       yb(1)-2];
end

Create Initial Guess

Use the bvpinit function to create an initial guess for the solution of the equation. Since the equation relates y′′ to y, a reasonable guess is that the solution involves trigonometric functions. Use a mesh of five points in the interval of integration. The first and last values in the mesh are where the solver applies the boundary conditions.

The function for the initial guess accepts x as an input and returns a guess for the value of y1 and y2. The function is

function g = guess(x)
g = [sin(x)
     cos(x)];
end
xmesh = linspace(0,pi/2,5);
solinit = bvpinit(xmesh, @guess);
Add a comment
Know the answer?
Add Answer to:
Q4. Obtain a fourth order of accuracy approximation formula for y'' (0). You can make use...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT