Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2a.) On solving u xx = f numerically for x (0, 1) with boundary condition u(0) = 0, u(1) = 1. Write a code to

2a.) On solving uxx = f numerically for x (0, 1) with boundary condition u(0) = 0, u(1) = 1.

Write a code to solve it with f(x) = sin(2x) + ex and the domain (0, 1) subdivided into 100 small intervals.

Write a subroutine to solve the equation with the number of intervals (denoted by m), and the right hand side function f(x) as input.

Pick a right hand side function so that you know the exact solution, run the code, calculate the error, and the convergence order by taking m = 10, 20, 40, 80, 160, 320, 640. Plot the error curve (as a function of the number of intervals) in a way that the convergence order is easily visualized.

2b.) Repeat number 2 with the boundary condition changed to u'(0) = 0, u(1) = 1 by adopting the first and then the second order treatment of the Neumann boundary condition at 0.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

Identify the major risks faced by business firms.

Answered: 1 week ago

Question

Which of the sources is most cost effective?

Answered: 1 week ago

Question

KEY QUESTION Refer to the table in question

Answered: 1 week ago