New answers tagged

2 votes

Pulling Results from NDSolve within a Table

...
user avatar
  • 121k
1 vote
Accepted

3D Parametric Plotting for N Charged Particles in a Nonuniform Electric Field

Your initial conditions are lists with 1 element, but numbers are expected. E.g. instead of x1[j][0] == pos0[[j, 1, ]] write x1[j][0] == pos0[[j, 1, 1]]
user avatar
  • 24.9k
7 votes
Accepted

Matrix Integro-differential equation

The problem can easily be solved after reformulation to a system of ODEs. Let us start with $$ \frac{d\rho}{dt}=-i[H_{0}(t),\rho(t)]-A^{2}\Big[H_{1},\int_{t1}^{t}e^{-B(t-s)}\Big(e^{-i\int_{s}^{t}H_{0}(...
user avatar
  • 16.1k
1 vote

Why does DSolve give 1/0 on this first-order Riccati ODE?

Fyi, this has been fixed in 13.1. Now it does not give 1/0 but gives the correct solution. The following is screen shot
user avatar
  • 110k
2 votes

DSolve returning "Indeterminate"

Fixed in 13.1. The following is screen shot
user avatar
  • 110k
3 votes

Problem with a DAE and DiscreteVariables

One can keep differentiating until the DAE turns into an ODE: ...
user avatar
  • 216k
7 votes
Accepted

Symbolic solution for steady-state heat equation i.e. Laplace equation inside cylinder

This post contains several code blocks, you can copy them easily with the help of functions here. It's not too surprising to see DSolve failing on the problem, ...
user avatar
  • 52.6k
3 votes

Heat Equation with Mobile Boundary

Since OP is having difficulty in understanding previous related posts, I'll solve the problem as a favor. But I won't explain much because there's nothing new in this problem compared with previous ...
user avatar
  • 52.6k
3 votes

Solution on nonlinear pde with intial condtion

There are initial values missing. For an example I assume the following initial values: U[0, t] == 1.4, V[0, t] == 2 Then there should be a comma instead of a ...
user avatar
  • 24.9k
6 votes

Solution on nonlinear pde with intial condtion

It produces an error. You need boundary conditions. You only have initial conditions. For numerical solver, both are needed. I put some below, but you need to put the correct ones as you know the ...
user avatar
  • 110k
8 votes
Accepted

Error in Attempting Moving Boundary Fluid System

… why would the system be classified by NDSolveValue a differential-algebric system, since every variable has at least one differential term? This isn't quite ...
user avatar
  • 52.6k
2 votes

non-linear first ODE with boundary condition

This is the same idea as Nasser's, but my route yielded solutions in a slightly different form. ...
user avatar
  • 216k
4 votes

Ploting solution to a differential equation with different parameters

Something to get you started,. You can use Manipulate ...
user avatar
  • 110k
2 votes

non-linear first ODE with boundary condition

Here is my hand solution with the help of the computer Solve \begin{gather*} \boxed{\frac{\left(y^{\prime}\right)^{2}}{y^{2}}-\frac{b y^{\prime}}{y}-\frac{k}{3 y^{2}}-\frac{f}{3}=0} \end{gather*} With ...
user avatar
  • 110k
7 votes

How do I plot the Lorenz attractor inside an ellipsoid?

Unless I've done something wrong, it does not appear that the trajectories stay inside the given ellipsoid. The given ellipsoid can be rewritten as $$ \frac{P}{b} x^2 + \frac{1}{b} y^2 + \left( z - \...
user avatar
3 votes

Linear ODEs with NDSolve

I have a package for solving eigenvalue boundary value problems using the Compound Matrix Method with the Evans function, which I'll use here. The package is available on my GitHub (which has a ...
user avatar
  • 5,433
2 votes

why DSolve gives "Warning: one or more assumptions evaluated to False." when I am not using any assumptions in the call?

It looks like one of the internal steps of DSolve is running ...
user avatar
  • 21
6 votes
Accepted

NDEigensystem: 1D problem with discontinuous coefficients

Yes, it's possible, we just need to use the documented but seldom-used and (probably) confusing last syntax of NDEigensystem. As discussed in Position of ...
user avatar
  • 52.6k
6 votes

Solve singular fourth order ODE

This is an incomplete answer, but perhaps you can combine it with the answer of @MichaelSeifert. It is more manual in a way, but perhaps allows you to understand where the numerical issues come from. ...
user avatar
2 votes

How to solve 2D Heat equation on rectangle with NDSolve?

The code is not working, what is my mistake? You had two minor mistakes. Your Rectangle was wrong Rectangle[{0, a}, {0, b}]. ...
user avatar
  • 110k
6 votes

Solve singular fourth order ODE

...
user avatar
8 votes
Accepted

Linear ODEs with NDSolve

This eigenvalue problem can be solved largely symbolically as follows. With the equations rationalized, ...
user avatar
  • 58.4k
7 votes

Linear ODEs with NDSolve

Update As mentioned by bbgodfrey and by Michael E2, the code I had proposed below only returns a trivial constant solution, as the following indicates: ...
user avatar
  • 60.4k
4 votes

Solving this system of differential equation with NDSolve

I fixed the exp that @cvgmt noted, pulled τc and Ip out of ...
user avatar
  • 17.7k
3 votes

How to Plot the solution of the heat equation on rectangle

u[x, y, t, 5, 5] is too small when t is large. Here we set {t, 0, 2}. Replace ...
user avatar
  • 33k
5 votes

How to Plot the solution of the heat equation on rectangle

A few observations. It is generally better to use a fixed PlotRange rather than All for an animation so your scale is not ...
user avatar
  • 7,419
3 votes
Accepted

Why does NDSolve[] want to treat my equations as Delay Differential Equations?

Nice to have the ODEs and ICs separate, because it makes separate analyses easier: ...
user avatar
  • 216k
0 votes

Why do two different Mathematica files with the same ODEs substituted with the same values give me different outputs?

The problem was that the numerical data values should be put right before the NDSolve command execution (not earlier)-then it can handle this really well. I dont know why it is such a difference for ...
user avatar
  • 47
4 votes
Accepted

Problem with a DAE and DiscreteVariables

As stated in the question, a[t] does not behave properly for the code in the question, which probably is a bug. Circumventing this problem can be accomplished with <...
user avatar
  • 58.4k
10 votes
Accepted

NDSolve for Laplace equation on disk is not working

3 issues here. You've mixed up polar coordinates and Cartesian coordinates. Since the equation is defined in polar coordinates, the shape of domain of definition is no longer a ...
user avatar
  • 52.6k
1 vote

How to define a function of parameters of a DSolve output?

An other way with DSolve is ...
user avatar
  • 15.7k
1 vote

How to define a function of parameters of a DSolve output?

You can solve with the parameters directly: ...
user avatar
  • 216k
4 votes

NDSolve for Laplace equation on disk is not working

It looks like the problem was with the periodic BC and JM's above showed how to handle this periodic BC. This below shows that DSolve can also solve this ...
user avatar
  • 110k
9 votes
Accepted

How to shoot backwards using the "Shooting Method"?

The "StartingInitialConditions" suboption sets the IC at x == 0.9, and with good values for the IC, a successful ...
user avatar
  • 216k
1 vote

Plot3D in Mathematica a function

Another approach: G[s_, t_] = Min[s, t] (Max[s, t] - 1); Plot3D[G[s, t], {s, 0, 1}, {t, 0, 1}, PlotStyle -> Green]
user avatar
13 votes

Phase Portrait on a Simplex

Here's another way (equations pulled from docs -- it's easier): ...
user avatar
  • 216k
5 votes

The solution for Sinh[] and Cosh[]

Let k -> -kk ...
user avatar
  • 15.7k
4 votes

The solution for Sinh[] and Cosh[]

If we multiply the arbitrary constant C[1] by I, FullSimplify can do the job if passed the ...
user avatar
4 votes
Accepted

Phase Portrait on a Simplex

Look what I got. Do not rush to accept the answer, look more carefully. You may need to add the equation of the simplex you are writing about to the plot for additional visualization. I can't help you ...
user avatar
  • 1,721
2 votes

How to put 2 or 3 NeumannValue conditions?

NeumannValue type boundary conditions may overlap, while DirichletCondition may not overlap. So something like this: ...
user avatar
  • 36.1k
1 vote

Why do I see Part::partw error when using NDSolveValue?

This was a bug that's fixed in V13.0 (or earlier).
user avatar
  • 36.1k
7 votes
Accepted

How does FindRoot decide if a solution has converged?

Turning my comment into an answer. I am in a rush now, Here are the relevant literature references for the affine covariant Newton solver that is implemented as a method of ...
user avatar
  • 36.1k
1 vote

If or Piecewise dependent coefficients in NDSolveValue

There are examples in the documentation that show how to do this: Have a look at the nonlinear (single material) model on the HeatTransferPDEComponent ref page. Concerning multi-materials you could ...
user avatar
  • 36.1k
4 votes

Inactive form for PDE and symmetry

Up until version 13.0 the finite element method works with Cartesian coordinates. In 13.1 one can use a truncated cylindrical coordinate for axisymmetric PDEs. It's unlikely that something else will ...
user avatar
  • 36.1k
2 votes
Accepted

NDEigensystem returns reversed list of eigenfuctions

As I pointed out in a comment above, this is because of an issue described in the documentation: Ordering of dependent variables. The simplest way to deal with this is to specify the "...
user avatar
  • 36.1k
2 votes

Plot3D in Mathematica a function

Option 1 is as follows: ...
user avatar
  • 177
3 votes

Plot3D in Mathematica a function

...
user avatar
  • 1,721
3 votes
Accepted

Plot3D in Mathematica a function

Try this: T[s_, t_] := Piecewise[{{s (1 - t), 0 <= s <= t <= 1}, {t (1 - s), 0 <= t <= s <= 1}}] Plot3D[T[s, t], {t, 0, 1}, {s, 0, 1}] ...
user avatar
11 votes
Accepted

Is it a bug in DSolve?

Symbolic algebra is, generically speaking, only generically true: Sometimes the solution space as given by a formula is missing a hypermanifold that is contained in the closure of the solution space. ...
user avatar
  • 489

Top 50 recent answers are included