Questions on the use of numerical functions NIntegrate and NDSolve.
2
votes
2answers
81 views
5
votes
0answers
162 views
3
votes
0answers
64 views
Using NDSolve for Integro-Differential Equations
I have a fairly complicated set of coupled non-linear integro-differential equations that I am trying to solve using NDSolve. The equations are:
...
2
votes
1answer
54 views
NDSolve with vector function
(Possible duplicate yet I still can't understand.)
Basic 2D revolving around origin:
...
2
votes
0answers
78 views
Solving homogeneous Fredholm Equation of the second kind
I am trying to solve a homogeneous Fredholm integral equation of the second kind, i.e.
$\lambda y(x) = \int\limits_a^b e^{i[\phi(t)+k(t-x/M)^2]} y(t)\,dt$
where $\lambda$ is the eigenvalue (to be ...
6
votes
2answers
163 views
How to deal with zero in NDSolve in mathematica?
I would like to solve the following ODEs
$$\begin{cases} x'(t)&=y\\
y'(t)&=-y(t)/t-e^{x(t)},\\
x(0)&=1,\\y(0)&=0,
\end{cases}$$
(EDIT :
The second equation used to be $y'(t) = ...
1
vote
0answers
82 views
Getting MemoryAllocationFailure from NIntegrate
When numerically calculating a double integral using NIntegrate over an infinite domain (with all options at their default), Mathematica 7 calculates my integral ...
2
votes
0answers
31 views
NIntegrate/NSum with parameters [duplicate]
I'm trying to calculate a continuous integral within a discrete integral.
Something similar to this (yet more complex):
...
1
vote
0answers
88 views
NDSolve diffusion equation over/underdetermined
I have a feeling the solution to my problem is very simple… but my knowledge of differential equations is pretty weak.
I am trying to solve a scalar diffusion equation (used in NMR spectroscopy, but ...
0
votes
1answer
114 views
DAE - varying initial conditions
I want to solve a DAE-system and I want to vary more than one initial conditions and to manipulate them. I looked here:
Putting NDSolve into ParametricPlot
But it does not work:
...
16
votes
2answers
358 views
3D orbits and inaccuracy over time
I wrote a little program to use Newton's Law of Universal Gravitation to animate 3 planets orbiting a central star, but I have run into a problem. Here is the code that I used to create the program (I ...
1
vote
1answer
87 views
How to adjust parameters to experimental data on a NDSolve problem
I have 2 differential equations with 2 variables, x and y,which are a function of t and I have the parameters k1, k2 y k3.
...
7
votes
0answers
132 views
Numerically solve 2nd order differential equation with singularity
Consider a second order differential equation with a potential that diverges at some generic value in the variable. For example:
$$-y^{\prime\prime}(s)+\frac1{\mathrm{cn}{(s\mid k^2)}}y(s)=0$$
where ...
6
votes
1answer
60 views
10
votes
1answer
213 views
Why can't I change the value of MaxRecursion in NIntegrate when integrating BesselJ?
I am trying to evaluate this integral numerically
$$
\int_0^{\infty } J_0(q R) \tanh(q) \, \mathrm{d}q
$$
for large values of $R$. This makes the integrand oscillate more quickly and Mathematica ...
-4
votes
0answers
60 views
Very long evaluation time of NDSolve [closed]
The following code takes a very long time, and I am not quite sure why. The Quiet is needed as otherwise there are many error messages of the form ...
1
vote
1answer
136 views
How to plot and solve the numerical solution of a integro-differential equation
I have a integro-differential equation of the form
$y'(t) = - \int_0^t {y(t_1 )} e^{t_1 - t} dt_1, {\rm{ t}} \in {\rm{[0,10], y(0) = 1}}$
My code is:
...
2
votes
0answers
154 views
Is mathematica storing information it shouldn't store?
I'm seeking to find solutions to a numerical integration with a large set of parameter combinations (basically, I'm doing a brute parameter sampling). Yet, I believe the memory of the computer is ...
0
votes
1answer
64 views
Notation for numerical solutions to differential equations
Can somebody explain this notation to me? Using Mathematica's first example in the NDSolve documentation:
...
1
vote
0answers
113 views
Adapting NDSolve to circumvent NDSolve::bdord: error for 1-D Euler Equations
I attempted to use NDSolve for the 1-D isentropic unsteady flow equations with low subsonic inflow velocity and prescribed inflow total enthalpy; along with a ...
2
votes
1answer
67 views
Infinite Expression Error from NDSolve
I am trying to solve a differential equation numerically. So I have
...
8
votes
2answers
133 views
Problem with NIntegrate when WorkingPrecision is specified
I am trying to evaluate this integral numerically:
$$
\int_0^{\infty } m \exp (-m) J_1(m){}^2 \, dm
$$
Everything is OK when only the integration method is specified:
...
3
votes
1answer
56 views
How to integrate ParametricNDSolve solution with respect to a parameter?
I have just upgraded to the new version of Mathematica because of its new built-in ParametricNDSolve function. I need to solve a first-order non-linear ordinary ...
4
votes
1answer
160 views
NDSolve for a large system of simple ODEs
I am solving a system of many (more than 100) ODEs.
It is the kind of standard rate equation encountered in semiconductor physics.
Here is the system:
...
4
votes
1answer
60 views
Differentiating ParametricNDSolve solutions
Is there any way to differentiate a solution obtained by ParametricNDSolve? For instance, I have the position $\phi_\gamma(t)$ as a function of time, parametrized ...
1
vote
2answers
92 views
NDSolve solution for driven damped pendulum diverges
I want to solve numerically for the system of the driven damped pendulum using Mathematica. This is the second-order nonlinear equation
\begin{equation}
\ddot{x} + 2 \beta \dot{x}+ \omega_0^2 \sin
...
2
votes
2answers
162 views
Animating the Lorenz Equations
I am trying to use the Animate command to vary a parameter of the Lorenz Equations in 3-D phase space and I'm not having much luck.
The equations are:
...
0
votes
1answer
66 views
Error messages when using NInverseFourierTransform
I have two functions that I need to inverse Fourier transform and I was trying to get Mathematica to help me. I tried simply using theInverseFourierTransform ...
1
vote
1answer
99 views
How does one specify Neumann conditions for NDSolve?
I have a series of functions defined in my notebook, and then want to use this to solve a diffusion-reaction type equation. At the moment, something like this works:
...
3
votes
3answers
146 views
How to speed up the plot of NIntegrate?
Here is a toy example:
f[t_] := NIntegrate[Sin[x], {x, 0, t}];
Plot[f[t], {t, 0, 10}] // Timing
Even such a simple example will take 2.8 seconds on my computer.
...
1
vote
1answer
133 views
Problems with NDSolve and stiffness
I am trying to solve an ODE in chemical kinetics:
$$\begin{align*}
\frac{\mathrm d[x]}{\mathrm dt} &= -k_1 [x][y]\\
\frac{\mathrm d[y]}{\mathrm dt} &= k_1 [x][y] - k_3[y]
\end{align*}$$
My ...
0
votes
1answer
76 views
NIntegrate fails while Integrate works
I have a function $f(t)$ defined as
$f(t)=\int\limits_0^t(t-\xi)^{\alpha-1}\ \cos(\xi)\ d\xi$
where $0<\alpha<1$. I now want to evaluate this integral at various values of time. Therefore, my ...
13
votes
1answer
262 views
Optimizing a Numerical Laplace Equation Solver
Laplace's Equation is an equation on a scalar in which, given the value of the scalar on the boundaries (the boundary conditions), one can determine the value of the scalar at any point in the region ...
1
vote
2answers
354 views
Solving a system of ODEs with the Runge-Kutta method
I´m trying to solve a system of ODEs using a fourth-order Runge-Kutta method. I have to recreate certain results to obtain my degree. But I'm a beginner at Mathematica programming and with the ...
3
votes
2answers
135 views
How to remove a singularity with WhenEvent
Bellow I have a differential equation which hits a singularity at low values of t. What I want to do is somehow utilize the WhenEvent command in order to replace ...
1
vote
0answers
131 views
How can I speed up numerical integration of multidimensional integral?
I am numerically solving an integral equation that contains a double integral. I have managed to get a solution but it takes forever. I am wondering if there is a way to speed up numerical integration ...
0
votes
0answers
82 views
NDSolve divergence in Mathematica 9
I have been working with Mathematica 7 and 8 to numerically solve partial differential equations by MethodOfLines of NDSolve. ...
2
votes
1answer
214 views
Creating hexahedral finite elements in Mathematica
Is it possible to do FEM using hexahedral elements in Mathematica? If it possible, is there any help to do that?
4
votes
2answers
123 views
-1
votes
1answer
124 views
double integration
I want to evaluate a double integral, but the limits of one integral is a function of the second. Like this
...
3
votes
2answers
106 views
Putting NDSolve into ParametricPlot
I am having issues using Manipulate to plot the (numeric) solution to an ODE for different parameter values.
I have a code that has several stages, which seem to ...
6
votes
0answers
63 views
Modify NDSolve`StateData (if possible)
I am trying to solve a PDE that needs to be scaled constantly (refer to this). @andre suggests I modify NDSolve`StateData.
Now, the problem is, I'm not used to ...
2
votes
2answers
259 views
NDSolve: Normalizing at every step
Suppose I have an transport equation with an initial conditions:
...
2
votes
2answers
101 views
BC for transport equation using NDSolve
First I can solve a transport equation with a source (Is it still called transport equation?) using DSolve. The form of the source serves only as an example. It can ...
8
votes
5answers
254 views
How do I obtain the enclosed area of this particular parametric plot?
I'm trying to find a way to obtain the enclosed area of this particular plot. Can someone show me how?
...
0
votes
1answer
76 views
What is the correct way to use NIntegrate inside the FindMinimum function?
I'm having minor issues with the FindMinimum function when using NIntegrate inside. The functions work perfectly well but I get ...
0
votes
0answers
70 views
Which integration strategy to use for this product of polynomials?
What would be the ideal integration strategy for a function like this: $$f(x_1,x_2,\dots,x_N)=\prod_{i=1}^Nx_i^{c_i}\Theta(x_i-p_i)$$ where $x_i,p_i\in \mathbb{R}$, $\Theta$ is the Heaviside function ...
1
vote
1answer
97 views
What do these error messages mean when numerically solving differential equations?
I am using Mathematica to numercially solve the following equations:
...
4
votes
1answer
173 views
NDSolve does not respond
For some sets of constants, NDSolve gives me true solutions, but when I try for example, T = 1/(2*2200), Mathematica does not respond. What can I do? The code below ...
3
votes
0answers
113 views
Principal Value Integration with NIntegrate [closed]
While trying to integrate numerically a function involving singularity (triple pole) I encounter some strange behaviour of Mathematica (I'm using Method -> "PrincipalValue"). Maybe someone can explain ...


