Solving differential equations using implicit methods

In summary, the backward Euler method is difficult to apply because you need to solve for yn+1. You can approximate yn+1 by using the fixed-point iteration zn+1=g(zn).
  • #1
Sagekilla
19
0
Hi all, I'm writing myself a ordinary differential equation solver and I've already implemented several explicit integrators, which were pretty easy for me to do. Now I've decided to work on some implicit methods (for any stiff equations) and I've run into some issues.

The most basic one is the Backward Euler:
[tex]y_{n+1} = y_{n} + hf(t_{n+1}, y_{n+1})[/tex]

And as I understand, to solve this you need to use some iteration to get the value of [tex]y_{n+1}[/tex] to solve that equation for the next time step.

The problem I have is: How can I solve this? I thought I could use something like Newton's method, but I don't know how to properly apply it.

Any help, even a push in the right direction would be appreciated. Thanks!
 
Last edited:
Physics news on Phys.org
  • #2
The backward method
[tex]y_{n+1} = y_{n} + hf(t_{n+1}, y_{n+1})[/tex]

need to solve for yn+1 via NR method.

[tex]y_{n+1} - y_{n} - hf(t_{n+1}, y_{n+1})=0[/tex]

Let [tex]g(z) = z - y_{n} - hf(t_{n+1}, z)[/tex]

The iteration
[tex]z_{i+1} = z_i - \frac{g(z_i)}{g'(z_i)} [/tex]
should converges to yn+1 using the initial estimation z0=yn.
 
  • #3
Thanks for your help! I never understood how to properly apply Newton's method before. I implemented it as you had shown, with:

[tex]z_{i+1} = z_{i} - \frac{z_{i} - y_{n} - hf(t_{n+1}, z_{i})}{1 - hf'(t_{n+1}, z_{i})}[/tex]

Is it safe to assume that I can say that: [tex]f'(t_{n+1}, z_{i}) = f(t_{n+1}, f(t_{n+1}, z_{i}))[/tex]

I thought it out for a few minutes, and it seemed reasonable in the context of a few examples I put together:

If we let [tex]\frac{dy}{dt} = -ky[/tex] then [tex]f(t, y) = -ky[/tex] and [tex]f'(t, y) = -kf(t, y) = f(t, f(t, y))[/tex]
 
  • #4
I thought that we have this relation: tn+1=t n + h
where h is the step size increment.
In the case of [itex]\frac{dy}{dt} = -ky[/itex] , f(tn+1, z) = -kz
 
  • #5
Yes, there is. But what I was asking was if I could replace the derivative of f inside of Newton's method by f(t, f(t, y)), since for first order ODEs it would be equivalent to differentiating (at least I think it is) all the y components of differential equation.

Because otherwise if I couldn't do that, then I know I'd have to numerically approximate the derivative as well.
 
  • #6
On a second thought, I think it is easier to use the fixed-point interation
zn+1=g(zn)
to approximates yn+1.

This eliminate the requirement to compute the derivative of f.
 

Related to Solving differential equations using implicit methods

1. What are implicit methods for solving differential equations?

Implicit methods are numerical techniques used to solve differential equations, which are equations that involve the derivatives of a function. Unlike explicit methods, implicit methods use the current and future values of the function to approximate the next value, making them more stable and accurate for certain types of equations.

2. How do implicit methods differ from explicit methods?

Explicit methods use only the current value of the function to approximate the next value, while implicit methods use both the current and future values. This allows implicit methods to handle stiff equations, which are equations that change rapidly over a small range of values, more effectively.

3. What types of differential equations can be solved using implicit methods?

Implicit methods can be used to solve both ordinary and partial differential equations. They are particularly well-suited for stiff equations or equations with discontinuities, as they are able to handle these types of problems more accurately than explicit methods.

4. What are the advantages of using implicit methods?

One major advantage of implicit methods is their stability. They are less prone to producing large errors or "blowing up" when solving stiff equations. They are also more accurate for certain types of equations, such as those with discontinuities or rapidly changing values.

5. Are there any disadvantages to using implicit methods?

The main disadvantage of implicit methods is that they require more computational resources and can be more time-consuming to implement. They also may not be as effective for non-stiff equations, as they sacrifice some accuracy for stability. Additionally, the choice of which implicit method to use for a particular problem can be challenging, as there are many different options available.

Similar threads

  • Differential Equations
Replies
5
Views
2K
Replies
65
Views
2K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
16
Views
1K
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
371
Replies
2
Views
4K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
8
Views
783
Back
Top