Heun's Method for Second Order ODE (Eng Maths)

In summary, for any second ODE, the two functions needed for Heun's method are f1(x,y1,y2) = y2 and f2(x,y1,y2) = xy1+x^2-y1. To apply Heun's method, we need to calculate a and b for both functions using the given formula.
  • #1
jisbon
476
30
Homework Statement
-
Relevant Equations
-
Question:
1596080237600.png

So I got around on doing this example, and I'm pretty sure I messed up somewhere, would appreciate if someone could point out what I did wrongly.
1) For any second ODE, I should let:
##y_{1}= y ## and ##y_{2}= y' ##
Hence,
##y_{1}'= y' = y_{2} ## and ##y_{2}'= y'' = xy(x)+x^2-y(x) = xy_{1}+x^2-y_{1} ##
Thus I have 2 functions:
##f_{1}(x,y_{1},y_{2}) = y_{2}## and## f_{2}(x,y_{1},y_{2}) = xy_{1}+x^2-y_{1}##

Heun's method then states that:
1596080778823.png
I will assume I have to do out a and b for both functions?
 
Physics news on Phys.org
  • #2
Yes.
[tex]
\begin{align*}
a_i &= hf_i(x_n,y_{1n}, y_{2n}) \\
b_i &= hf_i(x_{n+1}, y_{1n} + a_1, y_{2n} + a_2)
\end{align*}
[/tex]
 

1. What is Heun's Method for Second Order ODE?

Heun's Method is a numerical method used to approximate the solutions of second order ordinary differential equations (ODEs). It is an extension of the Euler's Method and is also known as the Improved Euler Method.

2. How does Heun's Method work?

Heun's Method involves dividing the interval of the ODE into smaller subintervals and approximating the solution at each subinterval using the slope of the tangent line at the beginning of the interval. This slope is then used to predict the value of the solution at the end of the interval. The average of the two predicted values is then used as the approximation for the solution at the end of the interval.

3. What are the advantages of using Heun's Method?

One advantage of Heun's Method is that it is more accurate than the Euler's Method, especially for smaller subintervals. It also has a higher order of convergence, meaning that the error decreases faster as the subintervals become smaller. Additionally, Heun's Method is relatively easy to implement and does not require advanced mathematical knowledge.

4. Are there any limitations to using Heun's Method?

One limitation of Heun's Method is that it can still produce significant errors for certain types of ODEs, such as those with sharp changes in the solution or those with rapidly oscillating solutions. It also requires a smaller step size compared to other numerical methods, which can increase the computational time.

5. How is Heun's Method different from the Runge-Kutta Method?

Both Heun's Method and the Runge-Kutta Method are numerical methods used to approximate solutions of ODEs. However, Heun's Method is an explicit method, meaning that the solution at each subinterval is only dependent on the previous subinterval. On the other hand, the Runge-Kutta Method is an implicit method, meaning that the solution at each subinterval depends on multiple previous subintervals. This makes the Runge-Kutta Method more accurate, but also more computationally demanding.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
714
  • Introductory Physics Homework Help
Replies
1
Views
195
Replies
2
Views
760
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Differential Equations
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Mechanics
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
464
Back
Top