# Thread: solving one dimension steady state heat equation with finite differences

1. ## solving one dimension steady state heat equation with finite differences

I have a project where I need to solve

T''(x) = bT^4 ; 0<=x<=1
T(0) = 1
T'(1) = 0

using finite differences to generate a system of equations in Matlab and solve the system to find the solution

So far I have:
(using centred 2nd degree finite difference)
T''(x) = (T(x+h) - 2T(x) + T(x-h)) / h^2 = bT(x)^4
and
(using 2 order backward difference)
T'(x) = (3T(x) - 4T(x-h) + T(x-2h)) / 2h

I just don't know how to write the code that will make the system of n non-linear equations to solve. I have a function that will solve them if I can get there...

any help or nudge in the right direction is appreciated

2. Originally Posted by Arkady
I have a project where I need to solve

T''(x) = bT^4 ; 0<=x<=1
T(0) = 1
T'(1) = 0

using finite differences to generate a system of equations in Matlab and solve the system to find the solution

So far I have:
(using centred 2nd degree finite difference)
T''(x) = (T(x+h) - 2T(x) + T(x-h)) / h^2 = bT(x)^4
and
(using 2 order backward difference)
T'(x) = (3T(x) - 4T(x-h) + T(x-2h)) / 2h

I just don't know how to write the code that will make the system of n non-linear equations to solve. I have a function that will solve them if I can get there...

any help or nudge in the right direction is appreciated
This is a boundary-value problem (as opposed to initial value problem).

There are several methods of solving these - which method did you want to use?

3. I want to use a numerical method. I need to discretize the problem by posing n points equally spaced by h. Apply the two finite difference equations in the previous post to come up with a system of n+1 equations.
Once I have that system of equations, I will be able to solve the problem...
I am not sure that this is a boundary value problem since I am given T(0)=1 and dT(1)/dx = 0
I thought boundary problems were when we know T(0) and T(1) ?

4. I found this
http://www.mathworks.com/matlabcentr...ference-method
that seems to get me a bit closer. However I cannot use the program as is because I only know the value of the derivative at x = 1 ...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•