Using Finite Difference Method In Excel

In summary, the conversation discusses the task of researching and using the three finite difference approximations (forward, backward, and central) to investigate the derivative of a given function over a range of values. The analytical derivative of the function is also mentioned. The goal is to plot the results from each method on the same graph and compare their accuracy.
  • #1
elliottmarter
15
0
------Question------​
a) Research the three finite difference approximations mentioned above (forward, backward and central). Use a spreadsheet to demonstrate each of these numerical methods for the function below.

y=x3 −x2 +0.5x​

Investigate the derivative over the range x = [0,1], using finite differences of 0.1

b)Plot the results from each method onto one graph, along with the analytical derivative of the function. Make sure your plot includes a legend.

------Answer------​

i can see that this is a really (really) easy question if you know how to utilise the finite differences method in excel, however as you can see from the question were weren't taught it and we have to research it, so i went to wikipedia (obviously!)

so anyway i see on wikipedia they have this:
4459049109_1b6568e49a_o.jpg


which i can partially understand, you just insert your function where it says f(x) and then link you x values to a table of values 0-1 in 0.1 steps, but i don't understand what the "h" stands for, then for part b i guess by analytical derivative it means just standard differentiation so:

y=x3 −x2 +0.5x

[tex]\stackrel{dy}{dx}[/tex]=3x2-2x+0.5​


if anyone could lend a hand or a link to a good "dummies guide" web page I'd be very grateful.

Thanks
Elliott M
 
Physics news on Phys.org
  • #2
h is your step. so in your case h = .1

That is kind of intuitive when you look at the equations. For the forward difference calculation you are adding +h which gives you the "forward difference" while for the backward difference calculation you subtract h in order to get the backward difference. Of course the central difference you add and subtract half your step to be in the middle. As for part B you are correct. The point of this excersize is probably to compare the accuracy of analytical differentiation with numerical differentiation (finite difference).
 

1. How do you set up a finite difference method in Excel?

To set up a finite difference method in Excel, you will need to create a spreadsheet with the necessary parameters and equations for your specific problem. This may include defining the grid size, initial conditions, and boundary conditions. You will then need to use Excel's built-in functions and formulas to calculate the values at each grid point.

2. What are the advantages of using finite difference method in Excel?

One major advantage of using the finite difference method in Excel is its user-friendly interface and accessibility. Excel is a widely used software, making it easy for scientists and engineers to implement this method without the need for specialized software. Additionally, the ability to easily make changes to the spreadsheet allows for quick analysis of different scenarios and conditions.

3. How accurate is the finite difference method in Excel?

The accuracy of the finite difference method in Excel depends on various factors such as the grid size, time step, and the complexity of the problem. Generally, as the grid size becomes smaller and the time step becomes smaller, the accuracy of the method increases. However, it is important to note that the finite difference method is an approximation and may not always provide exact solutions.

4. Can the finite difference method in Excel be used for all types of differential equations?

The finite difference method in Excel can be used for a wide range of differential equations, including both ordinary and partial differential equations. However, it is more suitable for simpler problems with regular and well-defined boundaries. For more complex problems, other numerical methods may be more appropriate.

5. Are there any limitations to using the finite difference method in Excel?

One limitation of using the finite difference method in Excel is the potential for numerical instability. This can occur when the grid size and time step are not chosen carefully, leading to inaccurate and unreliable solutions. Additionally, Excel has a limited number of grid points and may not be able to handle very large or complex problems. In these cases, a more specialized software may be needed.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
Replies
1
Views
924
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Quantum Physics
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Atomic and Condensed Matter
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top