Skip to main content

New answers tagged

1 vote
Accepted

Error: Using NeumannValue with NDSolve correctly

The solution isn't unique, you need additional Dirichlet condition. Examplary I take v[0,1]==0. NDSolve command with changed y-range (see my comment) follows to <...
Ulrich Neumann's user avatar
0 votes

Shallow-water equations on a rotating sphere by using the NDSolve method with a purpose of earthquake-generated tsunami simulation

Its difficult or hopeless to NDSolve waves on a sphere with boundaries because the governing Laplacian has discrete spectrum. Eigenfunctions of the Laplacian with non-integer eigenvalues belong to ...
Roland F's user avatar
  • 3,965
0 votes

Using Mathematica to solve Newton's Equations

If I understand your question and comment right try NDSolveValue : ...
Ulrich Neumann's user avatar
2 votes

How to solve the partial differential equations?

Check the Neumann-conditions! Try ...
Ulrich Neumann's user avatar
-1 votes

How to solve the partial differential equations?

The inhomogenuous equation $$ \Delta_{x,y}\left(-e^x \ \sin (\pi y) +g(x,y)\right) == \ e^x \ \sin (\pi y) $$ results in the homogenous equation. $$\Delta_{x,y} g(x,y)==0$$ Reformulate the other ...
Roland F's user avatar
  • 3,965
3 votes

Speed up finite element method solver with small features

The main problem is that your initial condition for T is not consistent with the PDE. You define: ...
user21's user avatar
  • 40.1k
3 votes

Speed up finite element method solver with small features

To solve this problem, we put characteristic scale L=300 and then rescale all geometrical parameters on L, as result we have <...
Alex Trounev's user avatar
  • 46.4k
1 vote
Accepted

Any workarounds to help DSolve solve this first order standard d’Alembert differential equation? (no initial conditions)

Workaround: ...
Michael E2's user avatar
  • 239k
1 vote

Unwanted Oscillation in Solution Occurs When Solving Poisson-Nernst-Planck Equation

As one of the possibly solutions we can decrease accuracy and use explicit method as follows ...
Alex Trounev's user avatar
  • 46.4k
1 vote
Accepted

Singularity error when solving Poisson-Nernst-Planck equation

We can use FEM to solve this problem as follows ...
Alex Trounev's user avatar
  • 46.4k
1 vote

Scaling DiracComb does not work properly in NDSolve

To avoid troubling MMA with complicated functions(DiracComb and DDE), we use WhenEvent instead. ...
metroidman's user avatar
3 votes

How to increase the mesh size in NDsolve

You can do that though a Method option but the exact option dependents on whether the DE is stationary or time dependent: ...
user21's user avatar
  • 40.1k
5 votes
Accepted

Singularity or stiff of system suspected

There is a typo in predator equation. We can compare Jacobian to that in the paper as follows ...
Alex Trounev's user avatar
  • 46.4k
1 vote

Finding and Plotting Minima

You can use ComplexExpand to get rid Abs and so forth, if z, ...
Goofy's user avatar
  • 3,569
2 votes

Solving a stiff non-linear initial value ODE for a set of parameters

There is a typo with WhenEvent usage in the code. In the computation process Z becomes very small and negative that lids to the complex solution. Therefore the ...
Alex Trounev's user avatar
  • 46.4k
2 votes
Accepted

How to Solve a DAE System with Integral Constraint and Moving Boundary in Mathematica?

To compute constraint, we can use code as it is with a small modification as follows ...
Alex Trounev's user avatar
  • 46.4k
2 votes

Boundary conditions issue with Laplace equation

In Version 14.0 this works: ...
user21's user avatar
  • 40.1k
4 votes
Accepted

Boundary conditions issue with Laplace equation

We can use OpenCascadeLink to generate mesh for this problem as follows (note, we rescale l, r, rs because the solution does not ...
Alex Trounev's user avatar
  • 46.4k
0 votes
Accepted

Numerically solved PDE of Ornstein–Uhlenbeck process on 2-Simplex violates conservation of probability

The initial condition was inconsistent and needed to exclude the boundary: ...
CRTmonitor's user avatar
1 vote

Boundary conditions issue with Laplace equation

It works if you remove one of the two balls. For example : : ...
andre314's user avatar
  • 18.7k
0 votes

Numerically solved PDE of Ornstein–Uhlenbeck process on 2-Simplex violates conservation of probability

Roughly your equation is $$\ \partial_t P =-\left(\frac{3}{2}\ - \ y \right) \ \partial_y \ P \ -\left(\frac{5}{2}-x \right) \partial_x \ P +\frac{1}{2}\Delta \ P \ + \frac{3}{2} \ P$$ by the fact ...
Roland F's user avatar
  • 3,965
3 votes
Accepted

Numerical solution with both Neuman and Drichlet BC at one point

Using my code from here we have ...
Alex Trounev's user avatar
  • 46.4k
3 votes

NDsolve does not solve equation

Here is an example that actually runs without messages, fixing a number of errors in @zeraoulia rafik's code and adjusting parameter values to make a nice plot: ...
Michael E2's user avatar
  • 239k
-1 votes

NDsolve does not solve equation

According to the recommendations given by @Nasser in the comment above, I have tried to show your solutions by adding the missing numerical values for your parameters and initial condition values. I ...
zeraoulia rafik's user avatar
2 votes

Solving a large number of coupled non-linear equations

For this equation it could be better to use implicit difference scheme in combination with FEM as follows ...
Alex Trounev's user avatar
  • 46.4k
1 vote

How to Compare Discrete and Continuous Lorenz System Solutions

...
ubpdqn's user avatar
  • 62.9k
3 votes
Accepted

Issue with a Piecewise Diffusion Problem

Change your bc to NeumannValue to force a FiniteElement-solution: ...
Ulrich Neumann's user avatar
1 vote
Accepted

Young Laplace equation with shooting method

We can use your code as it is with small modification ...
Alex Trounev's user avatar
  • 46.4k
6 votes
Accepted

How to NDSolve a PDE that contains the integral of the solution?

We can solve this problem using method of lines as follows ...
Alex Trounev's user avatar
  • 46.4k
1 vote
Accepted

NDSolve::nlnum and NDSolve::bcedge

The first comes from the NDSolve here, where it returns NDSolve::nlnum, To remove NDSolve::nlnum add this method: ...
Nasser's user avatar
  • 147k
3 votes

Are there contributed Mathematica programs which yield the normal form and Lyapunov coefficients of an ODE at a bifurcation point, in dimens 3 or more

This is not an answer to the question or at least only a partial one. It may help to get started though. A Hopf bifurcation at an equilibrium, if I understand correctly, happens when the Jacobian has ...
Daniel Lichtblau's user avatar
2 votes
Accepted

Are there contributed Mathematica programs which yield the normal form and Lyapunov coefficients of an ODE at a bifurcation point, in dimens 3 or more

I have no method but Let's refine the script you provided to ensure it handles the computation of the L1 coefficient and the normal form correctly. I'll integrate improvements while maintaining the ...
zeraoulia rafik's user avatar
0 votes

Can I solve system of differential equation in a matrix form?

You don't need column vector form for Mma/WL: row will suffice, e.g. v = {x[t], y[t]}; a = {{6, -4}, {1, -2}}; DSolve[D[v, t] == a . v, v, t] -> ...
ubpdqn's user avatar
  • 62.9k
0 votes

I have a problem with this code because it is time invertible symmetric but it is not working

Although the question is not entirely clear to me, I presume that a solution symmetric about x = 0 is desired. To produce such a solution, both the ODE and its ...
bbgodfrey's user avatar
  • 61.8k
4 votes

Stiff differential equation

Use asymptotic expansion at $x=0$ of linearization of the ODE (the nonlinear term vanishes to high order there) to help get NDSolve started. Then used Brent's ...
Michael E2's user avatar
  • 239k
4 votes

Stiff differential equation

You can't solve with BC at infinity numerically. Since this BVP, you can try shooting method. Best I could make run to is up to $x=4$ ...
Nasser's user avatar
  • 147k
0 votes

Integrating over an interval

[H]ow do I integrate v from xmin to x_1, then x_1 to <...
Michael E2's user avatar
  • 239k
0 votes

Solving partial differential algebraic equation in Mathematica

The latest packages for PDE use DirchletCondition as a container for the boundary condtions of the unknowns and for Neumann boundary conditions replace the right side $eq==0$ by a source term, that ...
Roland F's user avatar
  • 3,965
2 votes

A differential equation of the form $x''+a^2 x=0$ does not lead to solutions involving sine and cosine

I think the solution you obtained from Mathematica is indeed correct but presented in an exponential form. To obtain the solution in terms of sine and cosine functions, you can use the fact that the ...
zeraoulia rafik's user avatar
2 votes
Accepted

A differential equation of the form $x''+a^2 x=0$ does not lead to solutions involving sine and cosine

kx=n Pi ky=(m Pi)/3 ode=T''[t]==-(kx^2+ky^2) T[t] sol=DSolveValue[ODEt,T[t],t] sol=Expand[Assuming[kx^2+ky^2>0,Simplify[sol]]] ...
Nasser's user avatar
  • 147k

Top 50 recent answers are included