Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Create a new program that prints out a table of the derivative of the function f(x)=x*x, with time (every second) for the first 20 seconds, using both the analytical method and the forward method discussed in class .
- The text displayed in the console (println() function) should follow this format: “t=..., x_a=..., x_n=...”. Notice the error introduced by the numerical differentiation. Also notice the improved accuracy when adjusting the variable h. Now replace the forward method with the central method of differentiation; simply google search for it. What do you notice about the results?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement