# Tag Info

Accepted

### How Jacobian matrix helps optimization faster?

You haven't told us exactly what optimization routine you're using, so it's difficult to provide a very specific answer to your question. However, if you don't supply your own Jacobian function ...
• 18.7k
Accepted

### How to calculate/derive analytic FEM Newton Jacobian

Your example is a pretty good indication that the two derivatives (with respect to $x$ and with respect to $u$) do not commute :) (In fact, they're very different beasts -- one is a Fréchet derivative,...
• 12.3k
Accepted

### Number of function calls and jacobian calls in scipy.root

At the point where you print out the Jacobian, adding traceback.print_stack() reveals that the first evaluation comes from ...
• 376
Accepted

### Sanity checking jacobians for Finite Element code

Like with any other thing you want to test, you need to come up with a list of situations where you know that something is true, and then check this. In many cases, knowing that something is true does ...
• 55.4k

### Specifying ode solver options to speed up compute time

Julia's DifferentialEquations.jl has a lot of tooling for automatically deriving (sparse) matrices. For more information, see the JuliaCon 2020 video on Auto-Optimization and Parallelism in ...
• 12.3k
Accepted

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

Finite difference approximations of the Jacobian are really only good if the step lengths are chosen appropriately for each coordinate. But a black-box solver like CVODE has no way of knowing what ...
• 55.4k

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

Given that $u \frac{\tau^2}{2} \ll 1$, one way of tackling the numerical oscillations, even before the actual term emerges, is a Taylor approximation in $u$ of the sine term (Thanks to Kirill for the ...
• 201

### Implementation of the Jacobian-free Newton method

Not sure where you get your equation for $\epsilon$, but ultimately your approximation for the Jacobian matvec operation is a finite difference approximation to the directed derivative of $F(\cdot)$. ...
• 4,238
Accepted

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

You've started with a singular linear system of equations $Ax=b$. As a practical matter, it's unlikely that $b$ lies exactly in the range of $A$, so at best you can find a least squares solution that ...
• 18.7k

### Sanity checking jacobians for Finite Element code

Well, the first obvious test is to check if the determinant of the Jacobian matrix is positive. If it not, it means that your element has inverted and your answer is going to be invalid. Otherwise, I ...
• 1,157

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

My first question: Will split ODE solvers likely work for my problem? From your description, this sounds like a textbook use-case for a split ODE solver. Neither an implicit method nor an explicit ...
• 1,104

### 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 ...
• 55.4k

### Specifying ode solver options to speed up compute time

It looks like you have a advection diffusion PDE discretized with finite differences. This gives an ODE of the form $$y' = f(y) = A y + D y,$$ where $A$ is the discretized advection operator and $D$...
• 1,104

### Step size constraint in Euler backward

This answer is about illustrating the comments on the structure of the Jacobian, the resulting Lipschitz constant and its consequences on the step size. There are only two non-zero entries per row ...
• 6,064

• 66
Accepted

### Solving differential equation by specifying jacobian pattern

odenumjac calls your function in a vectorized manner it seems, and your function is not vectorized. You can easily change that by changing the second index of f in ...
• 1,868

### Number of function calls and jacobian calls in scipy.root

Studying your code and comparing it with the provided system of nonlinear equations, there is an error in the following code snippet. ...
Accepted

### Jacobian for 6-noded triangle in 3D to calculate the area

Assuming an isoparametric formulation and using the shape functions you show in your post, you can write $x=N_ix_i, y=N_iy_i$, and $x=N_iz_i$ where $x_i, y_i$, and $z_i$ are the coordinates of the six ...
• 6,064
1 vote

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

In this second part, I reuse the first code inserted above to calculate the Lyapunov exponents (Graph 1) and the sensitivity of the system regarding the imposed conditions (Graph 2). In this code, I ...
1 vote

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

Good morning, good afternoon or good night :-). I made two programs in octave on the subject of forced pendulum, as described in my physics lab (website, Chaotic Pendulum: https://www.myphysicslab.com/...

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