# Tagged Questions

Questions on the use of numerical functions NIntegrate and NDSolve.

183 views

### How to add (energy) constraint when using NDSolve to Equation of Motion

To simplify my problem, I will try and solve the Equation of Motion for a particle in a 1D Harmonic Potential. energy[x_, p_, m_, ω_] := p^2/(2 m) + (m ω^2)/2 x^2 ...
260 views

154 views

### StepMonitor not working inside ParametricNDSolveValue

Here is a toy example: ...
164 views

### Why am I getting different answers for an integral depending on method?

I'm trying to carry out an integral and I'm finding different answers depending on which method I choose to integrate with. I assume this has something to do with divergent pieces but I don't ...
151 views

### Finding minimum fly-by radius between Mars and spacecraft from interpolating function

I've written an interplanetary trajectory solver/plotter that plots the path taken by a spacecraft on an Earth-Mars mission, but have run into a little trouble when the spacecraft actually reaches ...
521 views

### Proper use of arbitrary number of variables

So, I'm working on a project where the number of independent variables is not fixed. Consider a problem of $N$ independent variables, $\boldsymbol{r}$. I want to perform different things with them. ...
170 views

### Numerical solution of Schrödinger-type equation in Mathematica [duplicate]

I want to solve the following differential equation numerically: $$i\partial_{t}\psi(r,t)=\left[-\frac{\Delta}{2m}+g\left|\psi(r,t)\right|^{2}+V_{d}(r,t)\right]\psi(r,t)$$ ...
336 views

...
102 views

### Modify NDSolveStateData (if possible)

I am trying to solve a PDE that needs to be scaled constantly (refer to this). @andre suggests I modify NDSolveStateData. Now, the problem is, I'm not used to ...
388 views

### Increase precision of custom function [closed]

I hope the title is not misleading: Suppose I have a function that is quite complicated, e.g. f[u_] := Exp[-Exp[- Abs[c.u]^a] Sin[d.u] Sin[(Abs[c.u]^a) ... I ...
662 views

115 views

### Does not evaluate the Integral and a plane plot

I am trying to compute a ContourPlot and a VectorPlot using the following functions: ...
310 views

### How to plot a function that is not defined after certain point

I'm plotting a function that I get after numerically integrating over another function. Something like: f[x_,y_]:=NIntegrate[g[x,y,z],{z,0,1}] I know that above ...