Determining Step Size with Given Problem Solving

In summary, there is a discrepancy in the given solutions for the problem provided, with a possible typo in the answer for the step size of 32 steps. The correct method for finding the step size from the number of steps is to divide the change in t by the number of steps.
  • #1
roam
1,271
12

Homework Statement



I have some trouble understanding the following solved problem:

http://img808.imageshack.us/img808/3340/euler2.jpg

This is the solutions they have given us:

[itex]E(32 \ steps) = 0.00097030[/itex]

[itex]E(64 \ steps) = 0.00003202[/itex]

32 steps has h=0.625

64 steps has h= 0.03125

The formula for effective order at stepsize h is

[itex]q= \frac{\ln |E(2h)|- \ln |E(h)|}{\ln 2}[/itex]

[itex]\therefore q (0.03125)= \frac{\ln |E(0.625)|- \ln |E(0.03125)|}{\ln 2} \approx 4.92[/itex]

The Attempt at a Solution



So I don't understand how they figured out that 32 steps has a step size of 0.625? What is the relationship between the stepsize and number of steps? :confused:

I used to think that step size and the number of steps were related like this:

[itex]h = \frac{1}{step \ size}[/itex]

But using this, for 32 steps I get a step size of h=1/32=0.03125, and for 64 steps I get h=1/64=0.0156. The only way I can get the correct answer is to multiply the denominator by 2, but why should I do that?

So, what's the problem with what I'm doing? Is my method wrong, or is that a typo in the given answers?
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
The problem states that y(1) = -1, and the solutions are at t=3.
The step size would be the change in t divided by the number of steps.
 
  • #3
Villyer said:
The problem states that y(1) = -1, and the solutions are at t=3.
The step size would be the change in t divided by the number of steps.

But still I don't get the correct answer. The correct answer says:

32 steps has h=0.625

64 steps has h= 0.03125

And if I divide the change in t by the number of steps I get

2/32=0.0625

2/64=0.03125

How come for 32 steps I got a different answer?
 
  • #4
I'm not sure. It's weird that the number they gave is off by a factor of 10, but the one for 64 is correct. Is it possible it's a typo?
 
  • #5
Yes. But are you sure in order to find the step size from the number of steps we have to divide the change in t by the number of steps? If that's the correct method then I think that may be a typo.
 
  • #6
Yes, Villyer is correct, and that's a typo.
 
  • #7
Okay thank you very much for the confirmation. And thanks a lot Villyer!
 

FAQ: Determining Step Size with Given Problem Solving

What is step size and why is it important in problem solving?

Step size refers to the amount by which a variable is changed in each iteration of a problem solving process. It is important because it helps to determine the efficiency and accuracy of the solution. A larger step size can lead to faster convergence, but it may also result in overshooting the optimal solution. On the other hand, a smaller step size may lead to slower convergence, but it also reduces the risk of overshooting the solution.

How do you determine the appropriate step size for a problem?

The appropriate step size for a problem can be determined through trial and error, by starting with a moderate step size and adjusting it based on the performance of the solution. It can also be calculated using mathematical formulas, such as the gradient descent algorithm, which takes into account the slope of the function at each step to determine the optimal step size.

Can the step size change during the problem solving process?

Yes, the step size can change during the problem solving process. This is known as adaptive step size, where the step size is adjusted based on the performance of the solution at each iteration. This approach can help to improve the efficiency and accuracy of the solution.

Are there any drawbacks to using a larger step size?

Yes, there are potential drawbacks to using a larger step size. As mentioned earlier, it can lead to overshooting the optimal solution, which can result in slower convergence or even divergence. Additionally, a larger step size may also require more computational resources, making the solution more time-consuming and costly.

How does the choice of step size affect the overall problem solving process?

The choice of step size can greatly impact the overall problem solving process. If the step size is too large, it may lead to inaccurate or inefficient solutions. On the other hand, if the step size is too small, it may result in slower convergence and longer processing times. Therefore, it is important to carefully consider and determine the appropriate step size for each problem to achieve optimal results.

Back
Top