# Finite Difference Method–Nonlinear Ode

** Heat conduction with radiation**:

If we once more consider the heat in a metal bar of length L but this time consider the effect of radiation as well as conduction then the steady state equation has the form

u_{xx}− d(u^{4}− u^{4}b) = −g(x),

Where u_{b} is temperature of the background d incorporates a coefficient of radiation as well as g(x) is the heat source.

If we again restore the continuous problem by its discrete approximation then we get:

(u_{i+1}− 2u_{i}+ u_{i−1})/ h^{2}− d(u^{4}_{i}− u^{4}_{b}) = −g_{i}= −g(x_{i}).

This equation is nonlinear in the unknowns therefore we no longer have a system of linear equations to solve however a system of nonlinear equations. One way to resolve these equations would be by the multivariable Newton method. In its place we introduce another interactive method.

** Implementing the Relaxation Method**:

In the following program we resolve the finite difference equations with the boundary conditions:

u(0) = 0 and u(L) = 0. We let L = 4, n = 4, d = 1, and g(x) = sin(πx/4).

Notice that the vector u forever contains the current estimate of the values of u.

*% mynonlinheat (lacks comments)*

*L = 4; n = 4;*

*h = L/n; hh = h^2/3;*

*u0 = 0; uL = 0; ub = .5; ub4 = ub^4;*

*x = 0:h:L; g = sin(pi*x/4); u = zeros(1,n+1);*

*steps = 4;*

*u(1)=u0; u(n+1)=uL;*

*for j = 1:steps*

*u(2:n) = (u(3:n+1)+u(2:n)+u(1:n-1))/3 + hh*(-u(2:n).^4+ub4+g(2:n));*

*end*

*plot(x,u)*

If you run this program with the specified n and steps the result will not seem reasonable.

We are able to plot the initial guess by adding the command plot(x,u) right before the for loop. We can as well plot successive iterations by moving the last plot(x,u) before the end. We can experiment as well as see if the iteration is converging. Try a variety of values of steps and n to produce a good plot. You will notice so as to this method converges quite slowly. In particular as we raise n we need to increase steps like n2 that is if n is large then steps needs to be really large.

* Relaxation Method for Nonlinear Finite Differences*:

We are able to rewrite equation as:

u_{i+1}− 2u_{i}+ u_{i−1} = h^{2}d(u^{4}_{i}− u^{4}_{b}) − h^{2}g_{i}.

From this we are able to solve for uiin terms of the other quantities:

2u_{i}= u_{i+1} + u_{i−1}− h^{2}d(u^{4}_{i}− u^{4}_{b}) + h^{2}g_{i}.

After that we add uito both sides of the equation to obtain:

3u_{i}= u_{i+1} + u_{i}+ u_{i−1}− h^{2}d(u^{4}_{i}− u^{4}_{b}) + h^{2}g_{i},

And afterwards divide by 3 to get:

u_{i}=1/3(u_{i+1} + u_{i}+ u_{i−1}) −h^{2}/3(d(u^{4}_{i}− u^{4}_{b}) + g_{i})

Now for the major idea. We will start with an initial guess for the value of uifor each i which we can represent as a vector u^{0}. Subsequently we will use the above equation to get better estimates, u^{1}, u^{2}, . . . , and expect that they converge to the correct answer.

If we let:

u^{j}= (u^{j}_{0}, u^{j}_{1}, u^{j}_{2}, . . . , u^{j}_{n−1}, u^{j}_{n})

Denote the jth approximation afterwards we can obtain that j + 1st estimate from the formula:

Notice that g_{i} and u_{b} don’t change. In the resulting equation we have u_{i} at every successive step depending on its previous value as well as the equation itself.

Assignmenthelptutors.com is dedicated to outstanding service with:

- They always available representatives live online support (chat and email) 24/7;
- discounts for repeat customers;
- secure payment methods and 100% confidentiality;
**Finite Difference Method – Nonlinear ODE**helps for students all over the world.- No Plagiarism

When you need the best **Finite Difference Method – Nonlinear ODE **online assistance, our team is here for you. We provide you 24/7 support teams dedicated to your success, **Assignmenthelptutors.com** experts having experience and degrees in their fields **Finite Difference Method – Nonlinear ODE** programming work and degrees, and even easy safe methods for reaching our experts when you need them. **Assignmenthelptutors.com** **Finite Difference Method – Nonlinear ODE** **homework assignments** do not have to be the worst experience of your school career, **Assignmenthelptutors.com** is here to provide you with the highest quality **Finite Difference Method – Nonlinear ODE **assistance every time.