Skip to main content
Tweeted twitter.com/#!/StackSciComp/status/496143318049619969
added 39 characters in body
Source Link
D.F.J.
  • 133
  • 5

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration.

Of course this only applies to some specific types of nonlinear equations. The equations I am dealing with is from a chemical equilibrium problem. The chemical evolution equation looks like $$\frac{d}{dt}x_i = f_i(\mathbf{x}) = -k_1x_i-k_2x_ix_j -k_3x_ix_k -\cdots + k_4x_j + k_5x_kx_h + \cdots,$$ $$\cdots$$ where the $k_i$s are all constants.

The goal is to solve the equations $$f_i(\mathbf{x}) = 0,\ \text{for }i=1,\ldots,n.$$ The approach I am talking about is to start from an initial guess $x_0$, and let it evolve until the $f_i$s are very close to $0$; an equilibrium solution is guaranteed to exist based on physical intuition (though not necessarily unique).

What I don't understand is that the ODE solver also has an Newton-Raphson iteration built-in, which is needed in an implicit scheme (which is the one I am using); how could the ODE approach be faster?

EDIT: The nonlinear equations have a trivial solution $\mathbf{x}=0$, but this is rarely the one we want. My understanding is that there is no guarantee the Newton iteration will converge to a ``physical'' solution starting from an initial estimate $\mathbf{x}_0$, while the ODE approach seems to have this property.

Update: I replaced one of the nonlinear equation with a conservation equation, and now the Newton method runs much faster (similar tosimilar to roughly 4 times faster than the ODE approach), and it is likely that not doing this will yield the wrong result, since the system of nonlinear equations is not completely independent (which makes the Newton solver complain).

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration.

Of course this only applies to some specific types of nonlinear equations. The equations I am dealing with is from a chemical equilibrium problem. The chemical evolution equation looks like $$\frac{d}{dt}x_i = f_i(\mathbf{x}) = -k_1x_i-k_2x_ix_j -k_3x_ix_k -\cdots + k_4x_j + k_5x_kx_h + \cdots,$$ $$\cdots$$ where the $k_i$s are all constants.

The goal is to solve the equations $$f_i(\mathbf{x}) = 0,\ \text{for }i=1,\ldots,n.$$ The approach I am talking about is to start from an initial guess $x_0$, and let it evolve until the $f_i$s are very close to $0$; an equilibrium solution is guaranteed to exist based on physical intuition (though not necessarily unique).

What I don't understand is that the ODE solver also has an Newton-Raphson iteration built-in, which is needed in an implicit scheme (which is the one I am using); how could the ODE approach be faster?

EDIT: The nonlinear equations have a trivial solution $\mathbf{x}=0$, but this is rarely the one we want. My understanding is that there is no guarantee the Newton iteration will converge to a ``physical'' solution starting from an initial estimate $\mathbf{x}_0$, while the ODE approach seems to have this property.

Update: I replaced one of the nonlinear equation with a conservation equation, and now the Newton method runs much faster (similar to the ODE approach), and it is likely that not doing this will yield the wrong result, since the system of nonlinear equations is not completely independent (which makes the Newton solver complain).

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration.

Of course this only applies to some specific types of nonlinear equations. The equations I am dealing with is from a chemical equilibrium problem. The chemical evolution equation looks like $$\frac{d}{dt}x_i = f_i(\mathbf{x}) = -k_1x_i-k_2x_ix_j -k_3x_ix_k -\cdots + k_4x_j + k_5x_kx_h + \cdots,$$ $$\cdots$$ where the $k_i$s are all constants.

The goal is to solve the equations $$f_i(\mathbf{x}) = 0,\ \text{for }i=1,\ldots,n.$$ The approach I am talking about is to start from an initial guess $x_0$, and let it evolve until the $f_i$s are very close to $0$; an equilibrium solution is guaranteed to exist based on physical intuition (though not necessarily unique).

What I don't understand is that the ODE solver also has an Newton-Raphson iteration built-in, which is needed in an implicit scheme (which is the one I am using); how could the ODE approach be faster?

EDIT: The nonlinear equations have a trivial solution $\mathbf{x}=0$, but this is rarely the one we want. My understanding is that there is no guarantee the Newton iteration will converge to a ``physical'' solution starting from an initial estimate $\mathbf{x}_0$, while the ODE approach seems to have this property.

Update: I replaced one of the nonlinear equation with a conservation equation, and now the Newton method runs much faster (similar to roughly 4 times faster than the ODE approach), and it is likely that not doing this will yield the wrong result, since the system of nonlinear equations is not completely independent (which makes the Newton solver complain).

added 614 characters in body
Source Link
D.F.J.
  • 133
  • 5

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration.

Of course this only applies to some specific types of nonlinear equations. The equations I am dealing with is from a chemical equilibrium problem. The chemical evolution equation looks like $$\frac{d}{dt}x_i = f_i(\mathbf{x}) = -k_1x_i-k_2x_ix_j -k_3x_ix_k -\cdots + k_4x_j + k_5x_kx_h + \cdots,$$ $$\cdots$$ where the $k_i$s are all constants.

The goal is to solve the equations $$f_i(\mathbf{x}) = 0,\ \text{for }i=1,\ldots,n.$$ The approach I am talking about is to start from an initial guess $x_0$, and let it evolve until the $f_i$s are very close to $0$; an equilibrium solution is guaranteed to exist based on physical intuition (though not necessarily unique).

What I don't understand is that the ODE solver also has an Newton-Raphson iteration built-in, which is needed in an implicit scheme (which is the one I am using); how could the ODE approach be faster?

EDIT: The nonlinear equations have a trivial solution $\mathbf{x}=0$, but this is rarely the one we want. My understanding is that there is no guarantee the Newton iteration will converge to a ``physical'' solution starting from an initial estimate $\mathbf{x}_0$, while the ODE approach seems to have this property.

Update: I replaced one of the nonlinear equation with a conservation equation, and now the Newton method runs much faster (similar to the ODE approach), and it is likely that not doing this will yield the wrong result, since the system of nonlinear equations is not completely independent (which makes the Newton solver complain).

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration.

Of course this only applies to some specific types of nonlinear equations. The equations I am dealing with is from a chemical equilibrium problem. The chemical evolution equation looks like $$\frac{d}{dt}x_i = f_i(\mathbf{x}) = -k_1x_i-k_2x_ix_j -k_3x_ix_k -\cdots + k_4x_j + k_5x_kx_h + \cdots,$$ $$\cdots$$ where the $k_i$s are all constants.

The goal is to solve the equations $$f_i(\mathbf{x}) = 0,\ \text{for }i=1,\ldots,n.$$ The approach I am talking about is to start from an initial guess $x_0$, and let it evolve until the $f_i$s are very close to $0$; an equilibrium solution is guaranteed to exist based on physical intuition (though not necessarily unique).

What I don't understand is that the ODE solver also has an Newton-Raphson iteration built-in, which is needed in an implicit scheme (which is the one I am using); how could the ODE approach be faster?

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration.

Of course this only applies to some specific types of nonlinear equations. The equations I am dealing with is from a chemical equilibrium problem. The chemical evolution equation looks like $$\frac{d}{dt}x_i = f_i(\mathbf{x}) = -k_1x_i-k_2x_ix_j -k_3x_ix_k -\cdots + k_4x_j + k_5x_kx_h + \cdots,$$ $$\cdots$$ where the $k_i$s are all constants.

The goal is to solve the equations $$f_i(\mathbf{x}) = 0,\ \text{for }i=1,\ldots,n.$$ The approach I am talking about is to start from an initial guess $x_0$, and let it evolve until the $f_i$s are very close to $0$; an equilibrium solution is guaranteed to exist based on physical intuition (though not necessarily unique).

What I don't understand is that the ODE solver also has an Newton-Raphson iteration built-in, which is needed in an implicit scheme (which is the one I am using); how could the ODE approach be faster?

EDIT: The nonlinear equations have a trivial solution $\mathbf{x}=0$, but this is rarely the one we want. My understanding is that there is no guarantee the Newton iteration will converge to a ``physical'' solution starting from an initial estimate $\mathbf{x}_0$, while the ODE approach seems to have this property.

Update: I replaced one of the nonlinear equation with a conservation equation, and now the Newton method runs much faster (similar to the ODE approach), and it is likely that not doing this will yield the wrong result, since the system of nonlinear equations is not completely independent (which makes the Newton solver complain).

Source Link
D.F.J.
  • 133
  • 5

Solving a system of nonlinear equations with an ODE solver is faster than with the Newton method?

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration.

Of course this only applies to some specific types of nonlinear equations. The equations I am dealing with is from a chemical equilibrium problem. The chemical evolution equation looks like $$\frac{d}{dt}x_i = f_i(\mathbf{x}) = -k_1x_i-k_2x_ix_j -k_3x_ix_k -\cdots + k_4x_j + k_5x_kx_h + \cdots,$$ $$\cdots$$ where the $k_i$s are all constants.

The goal is to solve the equations $$f_i(\mathbf{x}) = 0,\ \text{for }i=1,\ldots,n.$$ The approach I am talking about is to start from an initial guess $x_0$, and let it evolve until the $f_i$s are very close to $0$; an equilibrium solution is guaranteed to exist based on physical intuition (though not necessarily unique).

What I don't understand is that the ODE solver also has an Newton-Raphson iteration built-in, which is needed in an implicit scheme (which is the one I am using); how could the ODE approach be faster?