Questions tagged [jacobian]

Questions related to the calculation or use of the Jacobian matrix or its determinant. Not to be confused with the Jacobi iterative method for solving systems of linear equations. For those, use [iterative-method] instead.

Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

Step size constraint in Euler backward

I am dealing with an assignment in MATLAB. It has to do with 'self-driving' cars which are driving in-front/behind eachother. Assuming M cars on a single-lane road, each car adjusts its speed based on ...
user46892's user avatar
5 votes
2 answers
430 views

Number of function calls and jacobian calls in scipy.root

Just as an exercise, I am numerically solving the following system of equations: $$ \begin{equation} \begin{cases} x^2 + y^2 = 32 \\ 3x + 7y = 15 \end{cases} \end{equation} $$ ...
Tarik's user avatar
  • 173
0 votes
0 answers
47 views

PETSc non-linear solvers (SNES): specifying single Eval & Jacobian function

The PETSc documentation example of a non-linear solver call has the user provide separate functions for the Jacobian and function evaluations: ...
Sardine's user avatar
  • 368
2 votes
1 answer
125 views

Spot redundant equations within nonlinear system of equations

Is there a general procedure to detect if in a system of m-nonlinear equations (also non polynomial) of n-unknowns some of the equations are redundant? Can the rank of the Jacobian matrix tell me ...
aSpagno's user avatar
  • 23
1 vote
0 answers
31 views

How to classify ODE equilibria that are stable but slowly changing in value with time?

I'm numerically solving a system of coupled ODEs where time is the independent variable. At each time, I can solve for the equilibrium values of my state variables where their respective derivatives ...
quantumflash's user avatar
1 vote
1 answer
92 views

Computing Jacobian in WENO scheme for advection in a porous media

I am trying to implement an advection equation for a coupled system of a two-phase flow in a porous media using a WENO scheme [1]. My equation is of the form: \begin{align} \frac{\partial (\phi(x,t) C(...
Iddingsite's user avatar
1 vote
2 answers
379 views

Calculating Lyapunov exponent (LE) for pendulum using ellipsoid growth - code yields negative LEs

I was redirected here from physics stack exchange where hopefully my question is more appropriate. Per my advisor, I have read the textbook Chaos, an introduction to dynamical systems by Alligood, ...
t-osu's user avatar
  • 21
2 votes
1 answer
338 views

Solving stiff ODEs: Dealing with Jacobian terms which take too long to compute with finite differences

I have a system of PDEs describing atmospheric chemistry and transport. I use finite-differences to make my system of PDEs into a system of ~10,000 ODEs. I then integrate the ODEs forward in time with ...
nicholaswogan's user avatar
2 votes
1 answer
192 views

Why can bad jacobians sometimes works better for implicit ODE method?

I'm solving a system of stiff ODEs describing atmospheric chemistry and transport. I am using CVODE BDF from Sundials Computing. I have two ways to approximate the jacobian: Allow CVODE to ...
nicholaswogan's user avatar
-1 votes
1 answer
256 views

How do I calculate the Jacobian of this function?

I have two vectors $r$ and $m$. Both vectors are $N\times1$. A function is calculated as - $F(1:N) = \phi r + (r^3 + rm^2)$ $F(N+1:2N) = \phi m + (m^3+mr^2)$ ...
Paddy's user avatar
  • 131
3 votes
1 answer
114 views

Calculating the Jacobian for a function containing a derivative

I have the equation $F(t) = \phi u + \frac{1}{2}\frac{d^2u}{dt^2} + u^3$ and broadly speaking, my task is to calculate the $\phi$ and $u(t)$ such that $F(t) = 0$. I am testing out a new algorithm to ...
Paddy's user avatar
  • 131
5 votes
2 answers
729 views

Specifying ode solver options to speed up compute time

I'm specifying the 'JPattern', sparsity_pattern in the ode options to speed up the compute time of my actual system. I am sharing a sample code below to show how I ...
Natasha's user avatar
  • 411
2 votes
0 answers
156 views

Jacobian matrix cutoff in ODE solver

I am studying an implementation of a 3rd semi-implicit Runge Kutta method (siRK3) from the book by Villadsen & Michelsen (1978), Solution of differential equation models by polynomial ...
IPribec's user avatar
  • 544
0 votes
1 answer
254 views

Solving differential equation by specifying jacobian pattern

This is a follow up to my previous question posted here I'm trying to construct the sparsity pattern of the jacobian matrix to speed up the computation of a large system of odes. The following is the ...
Natasha's user avatar
  • 411
1 vote
1 answer
83 views

solving differential equations with jacobian pattern

I'm trying to compare the simulation time for solving a system of differential equations with and without jacobian pattern for a toy model using ode15s in MATLAB. ...
Natasha's user avatar
  • 411
2 votes
1 answer
233 views

Method of Lines: How to simplify Jacobian with periodic BCs?

Consider the advection equation $$\frac{\partial u}{\partial t}+c(x)\frac{\partial u}{\partial x}=0.$$ With periodic boundary condtitions in $x$ with period $L$, i.e. $u(x,t)=u(x+L,t)$ and initial ...
Peanutlex's user avatar
  • 219
2 votes
2 answers
2k views

How to determine the Jacobian Ratio for triangle element?

I am trying to implement an algorithm to find the Jacobian ratio for each triangle in mesh as a part of mesh quality check. Let's say that I have vertices of the triangle: $P_1(x_1, y_1, z_1)$, $P_2(...
Aravindh SK's user avatar
3 votes
1 answer
79 views

Does the k-th approximate solution of a stationary iteration belong to the k-th Krylov subspace?

For an stationary iteration method solving $Ax=b$ as follows: $$ Mx_k = Nx_{k-1}+b, $$ I have known that when $M = I$, i.e., the Richardson iteration, the k-th solution $x_k = x_{k-1}+r_{k-1}$ is in ...
Happy's user avatar
  • 961
3 votes
1 answer
154 views

Calculating the jacobian of norm and square root terms in the Finite Element Method

In the code that my group is writing (Lethe) we use a stabilized approach to solve the Navier-Stokes equation. The GLS stabilized method we use has a stabilisation term which contains a stabilization ...
BlaB's user avatar
  • 1,147
0 votes
0 answers
51 views

On using Ritz Method to solve a Mindlin–Reissner plate

I am trying to replicate the method given in the this paper. I have written a Matlab program which determines the displacement field of Mindlin–Reissner plate theory using Ritz method. The limitation ...
Ali Baig's user avatar
1 vote
0 answers
185 views

Numerically Approximating the Jacobian and Comparing the Eigenvalues With Analytical Form

I am trying to study the stability of numerical discretization schemes using the Jacobian matrix of the residues with respect to the vector of conserved variables. For a simple diffusion equation ...
LM_O's user avatar
  • 77
0 votes
1 answer
123 views

Numerical Stability of a Generalized Spatial Discretization Scheme

After reading the matrix stability chapter (10) of Hirsch [1], I decided to dive in the reference list of the chapter. One of the papers [2], which is cited as reference shows an very interesting ...
LM_O's user avatar
  • 77
3 votes
0 answers
36 views

Detecting blocks in non-linear system of equations

When solving systems of non-linear equations using Newton's method, it is often observed that the system has an independent sub-system, e.g. : $$ f(x,y) = 0 $$ $$ g(x,y) = 0 $$ $$ h(x,y,z) = 0 $$ If ...
Anon_Chem's user avatar
0 votes
1 answer
119 views

Debugging Newton-method used in a CG-approach

I am currently proof-checking my program, which is intended to use Newton's method for solving nonlinear equations, using a continuous galerkin approach. Thus, as first step I checked it using a time-...
arc_lupus's user avatar
  • 543
1 vote
2 answers
662 views

Implementation of the Jacobian-free Newton method

In my calculation (of a simple heat equation, for testing) using the Newton method, I tried to replace the full Jacobian matrix with an approximation vector, i.e. replacing $J$ in $$J(u)\delta u=-F(u)...
arc_lupus's user avatar
  • 543
1 vote
1 answer
310 views

Shooting method implementation

I have a trouble of defining a Jacobian matrix for my problem. Basically, I have 4 differential equations to be solved. $$ \begin{aligned} \dot x_1(t)&=x_2(t)\\ \dot x_2(t)&=p_2(t)−\sqrt 2 ...
Farid Hasanov's user avatar
5 votes
1 answer
895 views

What is the fastest method to invert millions of matrices?

My project involves large simulation and estimation. For each simulation I need to solve 600,000 systems of nonlinear equations. Currently I am using Newton's method to find the solutions. That ...
THwang's user avatar
  • 53
7 votes
2 answers
685 views

How to calculate/derive analytic FEM Newton Jacobian

I trying to wrap my head of derivation of the analytic FEM Jacobian for the Newton method. Say we have a nonlinear Poisson problem of the (weak) form $$ \int a(u)\nabla\ u\cdot \nabla v = \int f v $$ ...
B Ring's user avatar
  • 73
1 vote
2 answers
214 views

How to verify solution to pre-conditioned linear systems solver?

I am solving Ax=b. A has a very large condition number (> O(10^10)) I am using the conjugate gradients method with point jacobi pre-conditioning. I obtained a solution 'x' that "looks" reasonable. ...
David's user avatar
  • 251
1 vote
0 answers
1k views

Newton - Raphson method : maxima of function in 2 variables

I am computing the maximum of a function (with two-variables) using Newton-Raphson method. The function is : $e^{-(x \ - x_0)^2 - (y \ - y_0)^2}$, whose maxima exists at $(x_0,y_0)$. The Jacobian ...
Sthavishtha Bhopalam's user avatar
1 vote
1 answer
809 views

Confusion about determining the jacobian in a rootfinding algorithm

I have written some Python code to determine the numerical roots of the following non-linear equation: $$f_m=\tan\lambda_m - \frac{\lambda_m}{1+a}$$ where $\lambda_m\gt0$ and $a\geq0$. The code is: <...
nluigi's user avatar
  • 277
1 vote
1 answer
620 views

FEM on tet10 element: negetive determinant at the Gauss point

I am trying to implement a fem code on tet10 elements. I follow the lecture notes for tet10 implementation given in http://www.colorado.edu/engineering/CAS/courses.d/AFEM.d/AFEM.Ch10.d/AFEM.Ch10.pdf ...
kaush's user avatar
  • 107
1 vote
0 answers
73 views

FEM/FVM/FD for structural modeling and stability issues due to large structural constants?

I've read that in modeling structures problems, the finite element method (FEM) is typically used. I am unfamiliar with FEM, but I am wondering, in particular, if using FEM, as opposed to finite ...
David's user avatar
  • 251
2 votes
2 answers
3k views

How Jacobian matrix helps optimization faster?

I tried some python optimization functions and some of them needed Jacobian matrix prior for faster convergence. I understand Jacobians are basically transformation matrices that data from one space ...
SKPS's user avatar
  • 171
2 votes
2 answers
734 views

Sanity checking jacobians for Finite Element code

I have a legacy DG finite element code for which I would like to write some unit tests. As it is written, for 2D problems, each degree of freedom has associated with it a Jacobian matrix (for later ...
user3482876's user avatar
1 vote
1 answer
8k views

Implementation of the Jacobi iteration to find the solution to $Ax = b$

I implemented the Jacobi iteration using Matlab based on this paper, and the code is as follows: ...
user avatar
2 votes
1 answer
11k views

Calculate Jacobian of triangular element given coordinates of vertices and displacements?

I am trying to determine quality of my mesh elements using the Jacobian determinant as the measure. My algorithm takes vertices of nodes in triangular mesh and moves them around so as to form ...
Vidhi's user avatar
  • 25
2 votes
0 answers
61 views

Optimal ordering in Jacobi SVD algorithm

In Jacobi SVD algorithm as given here every pair of columns of the matrix is orthogonalized until convergence. I want to know that how does the order of selection of the pair of columns affect the ...
sv_jan5's user avatar
  • 121
4 votes
1 answer
180 views

Does the limit of $\frac{\partial f}{\partial u}$ at $u=0$ exist?

For an optimization routine I needed to compute the derivative of the right-hand side $\: f_u(x_k, u_k)$ of a discrete-time system $x_{k+1} = f(x_k, u_k)$. Since $\: f_u(x_k, u_k)$ includes terms that ...
Max Herrmann's user avatar
5 votes
1 answer
3k views

Newton's method goes to zero determinant Jacobian

I am using the Newton's method to solve $3\times3$ systems. For some particular cases, it turns out that at a given iteration, the Jacobian matrix cannot be inverted and that its determinant is very ...
Sylvain B.'s user avatar
2 votes
2 answers
330 views

Ill-conditioned Jacobian matrix from Nernst-Planck equation with Butler-Volmer reactions

The governing equations are listed here of my notes on page 4. It's a reproduction of other's paper which solves the equations with COMSOL. The problems arise when I want to solve for the consistent ...
raegakj's user avatar
  • 83
1 vote
0 answers
79 views

"Damping factor" for a set of non-linear ODEs

I have a set of four non-linear ODEs representing a negative feedback. I have done parameter variation by random sampling to study the sensitivity of steady state and other dynamic properties to ...
WYSIWYG's user avatar
  • 143
2 votes
0 answers
156 views

Rank deficient Jacobian in discretized periodic solutions to autonomous ODE

I'm trying to numerically find periodic solutions to different systems of autonomous nonlinear ordinary differential equations. I decided to use a finite difference scheme and solve the resulting ...
cnschn's user avatar
  • 21
2 votes
0 answers
635 views

Jacobian-Free Newton-Krylov vs explicitly forming jacobian in DG

For a given discontinuous galerkin (DG) implementation for Navier-Stokes, targeting 10,000 to 1,000,000 4th order cells in 3D, I'm using PETSc's suite of linear/non-linear solvers on the back-end. It ...
Aurelius's user avatar
  • 2,355
2 votes
1 answer
1k views

Is there a relatively simple way to extract the Jacobian from a Runge-Kutta 4/5 integrator?

I have a RKF45 numerical integrator that simulates polymerization of proteins using CUDA. It does so by tracking the populations of discrete length polymers, e.g. monomers, dimers, trimers, etc. all ...
Hair of Slytherin's user avatar
3 votes
2 answers
2k views

Levenberg-marquardt: How to calculate the jacobian with fixed parameters

So I'm working on a fitting algorithm using the levenberg-marquardt algorithm and I'm a bit stumped as to how to handle fixed parameters. Looking around at other code, like the minpack version of the ...
reptilicus's user avatar
4 votes
2 answers
211 views

Non-linear root finding with positive definite Jacobian

I am dealing with a system of non-linear equations: $$ f(\boldsymbol{x}) = \boldsymbol{y}, \;\;\; \boldsymbol{x}, \boldsymbol{y} \in \mathbb{R}^d. $$ And I know that the Jacobian $J(\boldsymbol{x})$ ...
Jugurtha's user avatar
  • 707
4 votes
2 answers
680 views

Poisson-Nernst-Planck equations with ill-conditioned sparse matrix

I am trying to solve Poisson-Nernst-Planck system of equations for ions diffusion problem using finite volume method. Nernst-Planck equation for mass transport and Poisson equation for electrostatic ...
Ben's user avatar
  • 41
2 votes
1 answer
481 views

How Matlab optimization works without Jacobian or Hessian

How does Matlab optimization tools works? It just gets the error function and doesn't need Jacobian (first derivatives) or Hessian (second derivatives)? How it is possible? If it is finite difference ...
Roy's user avatar
  • 133
11 votes
5 answers
534 views

How to deal with complexity in numerical code, for example, when dealing with large Jacobian matrices?

I am solving a non-linear system of coupled equations, and have calculated the Jacobian of the discretised system. The result is really complicated, below are (only!) the first 3 columns of a $3\times ...
boyfarrell's user avatar
  • 5,389