13 votes
Accepted

Why do we solve non-linearity in hyperbolic PDEs that way?

The good thing about the conservative form is that this comprises multiple models, such as Shallow Water Equations, Euler Equations or traffic models. An essential feature of hyperbolic equations is ...
Dan Doe's user avatar
  • 1,073
8 votes
Accepted

How to solve the problem without using symbolic computation

You can solve this numerically in Python without symbolic computation. from __future__ import print_function, division import numpy as np from numpy import exp from scipy.integrate import quad from ...
numerical-solution's user avatar
8 votes

Limitations with dynamical systems vs. PDEs?

PDEs are a form of dynamical system where there is another continuous variable. Usually this is space, so you're looking at how things over time and space instead of just over time. Here's an ...
Chris Rackauckas's user avatar
8 votes

Jacobians with automatic differentiation

Julia has a whole ecosystem for generating sparsity patterns and doing sparse automatic differentiation in a way that mixes with scientific computing and machine learning (or scientific machine ...
Chris Rackauckas's user avatar
7 votes

Solving a linear equation system with pure Neumann condition

Pure Neumann problem is unique up to a constant. My two favourite solution strategies: Modifying the equation $-\Delta u = f$ to $-\Delta u + \varepsilon u = f$ for some small $\varepsilon>0$. If ...
knl's user avatar
  • 2,076
7 votes
Accepted

Understanding the Eisenstat-Walker method for choosing the tolerance of a linear solver when solving a non-linear PDE

$s_k$ is the "approximate Newton" search direction. So in essence, when they say Choose $s_k$ such that $\|F(x_k)+F'(x_k)s_k\| \le \eta_k \|F(x_k)\|$ they are saying: Solve the Newton system $F'(...
Wolfgang Bangerth's user avatar
6 votes
Accepted

treating "almost linear" nonlinear least-squares problems

If you change variables to optimize for the residual of the linear part, then the Hessian will be a low-rank update to the identity. Then L-BFGS would work very well. Specifically, your problem takes ...
Nick Alger's user avatar
  • 3,143
6 votes
Accepted

GMRES vs Newton-GMRES for Solving nonlinear PDE's

The reason is that GMRES can only be used for solving linear equations, i.e. equations of the form $Ax=b$, where $A$ is some matrix and $x,b$ are vectors. What GMRES does, essentially, is it ...
bgav's user avatar
  • 106
6 votes

What are systematic ways of approximating a non-smooth (non-continuously differentiable) system dynamic to be n-smooth?

Two systematic ways of smoothing a function $h$ would be: 1. Join the piecewise smooth parts of your function using Hermite interpolation so that the derivatives are matched to your satisfaction. 2. ...
Juan M. Bello-Rivas's user avatar
5 votes
Accepted

What is the preferred method for evolving the Nonlinear Schrödinger Equation?

You won't find universal agreement among experts on a single best way to solve this equation. On the other hand, since it is a PDE in one spatial dimension there are many approaches that will give ...
David Ketcheson's user avatar
5 votes
Accepted

Pseudo Code for non linear power function fit needed

Chapter 10 of Numerical Analysis (Richard L. Burden, J. Douglas Faires) gives good readable pseudo code for Newtons method. The start parameters are taken from the solution of the linear problem of ...
Jan Hackenberg's user avatar
5 votes
Accepted

What would be a good approach to solving this large data non-linear least squares optimisation

I don't know much about tracking implicit surfaces, so I'm just going to start with the optimization problem and go from there. The optimization problem is, at the core, nonlinear least squares, and ...
Nick Alger's user avatar
  • 3,143
5 votes
Accepted

Stopping criteria in iterative methods for solving nonlinear equations

It can happen in principle that the condition on $f$ will never be satisfied, if, for example, $|f'(x_*)|u>\mathit{tolfun}$, where $u$ is the unit roundoff. When I tried your example with $K=10^8,...
Kirill's user avatar
  • 11.4k
5 votes

How does Mathematica compute real and complex solutions to single, non-polynomial equations?

As the other Answer already touches on the possibility of a symbolic root-solver being applied to this particular equation (by transforming into a polynomial form, albeit of degree $\ge 5$), I'll make ...
hardmath's user avatar
  • 3,359
5 votes
Accepted

Nonlinear least-squares solvers vs. generic minimization

If we let $\phi(x)=\sum_{i=1}^{m} F_{i}(x)^{2}$, we could compute $\nabla \phi(x)$ by finite difference approximation. However, it is generally smart to make use of the special structure of $\phi(...
Brian Borchers's user avatar
5 votes

Discrete-time Algebraic Riccati Equation (DARE) solver in C++

If you want a ten-line solution that is decently fast and stable, you can implement yourself the structured doubling algorithm: set up the coupled iteration $A_0 = A, G_0 = G = BR^{-1}B^T, H_0 = Q$ ...
Federico Poloni's user avatar
5 votes
Accepted

Numerically solving a non-linear PDE

First off, the PDE can be rewritten instead as $$\frac{\partial C}{\partial t} = \frac{\partial}{\partial x}C\frac{\partial C}{\partial x}$$ or, by applying the product rule in reverse again, as $$\...
Daniel Shapero's user avatar
5 votes
Accepted

Solving system of nonlinear vector functions

If you have a single vector equation $\vec{F}(\vec{x})=0$ then you solve it by representing that state vector $\vec{x}$ as a set of amplitudes $[x_0,x_1,...,x_{n-1}]$ after discretization by your ...
Maxim Umansky's user avatar
5 votes

Spot redundant equations within nonlinear system of equations

In the example you give, the two equations are not redundant. Each of the two equations describes a set of lines in the 2d plane, and the lines happen to be tangential at a specific point -- which is ...
Wolfgang Bangerth's user avatar
4 votes
Accepted

Evolving nonlinear Schrodinger equation with higher-order algorithms?

Your added edit to the question points exactly the way this needs to be done: You first evolve your field using a half-step with the $\hat D$ operator, then a full step with the $\hat N$ operator, and ...
Wolfgang Bangerth's user avatar
4 votes
Accepted

Methods of solving non-linear advection-diffusion systems beyond Newton-Raphson?

I'm assuming the limitation in 2D and 3D is storing the Jacobian. One option is to retain the time derivatives and use an explicit "pseudo" time-stepping to iterate to steady state. Normally the CFL ...
Aditya Kashi's user avatar
4 votes

Solving a linear equation system with pure Neumann condition

Including even one Dirichelt condition changes the problem you are trying to solve and will not give you the correct solution! You must fulfil the Discrete Compatibility Criteria, see e.g. first and ...
DrHansGruber's user avatar
4 votes

Solving ODE with multiple equilibriums

There are a couple of questions implicit in your post: How does one deal with non-uniqueness of the algebraic equations generated by any implicit numerical method? Typically you have a very good ...
David Ketcheson's user avatar
4 votes

Newton method for a nonlinear system of time-independent PDEs

Conceptually, forget about the fact that the problem is time dependent for a moment. That's because if you apply a time stepping scheme to your time dependent PDE, you're going to get a (in your case ...
Wolfgang Bangerth's user avatar
4 votes
Accepted

C++ template design pattern for groups (algebra)

Chapters 6 and 7 of Stepanov and Rose's book From Mathematics to generic programming deal precisely with what you asked. The first author is the designer of the C++ Standard Template Library.
Juan M. Bello-Rivas's user avatar
4 votes
Accepted

Radiation boundary condition (heat transfer)

This is not particularly difficult once you realize that the nonlinear boundary condition simply yields a nonlinear term in the weak formulation. Let's assume that you want to solve the steady state ...
Wolfgang Bangerth's user avatar
4 votes

Quantifying the degree of nonlinearity in a heat transfer problem

A quick and dirty approach to quantify the nonlinearity could be to evaluate $$\frac{1}{k}\frac{dk}{dT}\frac{\partial T}{\partial t}\delta t.$$ It's dimensionless and quantifies how much relative ...
Daniel Shapero's user avatar
4 votes
Accepted

Integrating a nonlinear ordinary differential equation

You don't have just a first-order ODE so you cannot use an explicit Runge-Kutta method. Because of the square term, you cannot bring this into mass matrix form even. Instead, what you have is an ...
Chris Rackauckas's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible