Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
2answers
683 views

nested numerical integration: not valid limits?

I encountered an error when I was hoping for some Mathematica (8.0.4) magic sparing me to code up numerical integration, function approximation and root-finding myself. The broader context and the ...
0
votes
1answer
43 views

Discrete sampling of interpolating function returned by NDSolve

When solving an ODE with NDSolve, Mathematica returns an interpolation function. I need a discrete sampling of this function however. Naively, I can write this as (example): ...
0
votes
1answer
116 views

I integrate a real function, I want a real result [closed]

I want to count some integral in Mathematica (actually, check that this integral is zero...) I arrive to an answer which has a zero real part but has some imaginary part! Why? This could be a mistake ...
0
votes
1answer
123 views

Error Function Integral (Erf)

Any idea how to solve analytically this integral Integrate[(a Erf[a Sqrt[b/(a^2 + b)] c])/(a^2 + b)^(3/2), a] I tried substitution u=a^2 + b, but it didn't work. ...
0
votes
1answer
86 views

Question with ParametricNDSolveValue

When solving the following system: ...
0
votes
2answers
173 views

Is there a better way to approximate some graphs of integrals than interpolation?

I'm still pretty new to Mathematica so my apologies if this is a dumb question. I wanted to plot some integrals of functions for no particularly good reason, but the only decent way I could come up ...
0
votes
1answer
121 views

Notation for numerical solutions to differential equations

Can somebody explain this notation to me? Using Mathematica's first example in the NDSolve documentation: ...
0
votes
2answers
308 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 ...
0
votes
1answer
1k views

Stategies to avoid NIntegrate::slwcon error

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b\gg 1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus ...
0
votes
1answer
43 views

How to solve this integral equation?

I am trying to solve for x the integral equation : ...
0
votes
1answer
61 views

Mathematica Compute Time Is Extremely Long (Integrate simple function with parameter scan)

I was wondering if you can help. I have a set of equations I need to solve for a list of parameters; entering each parameter value and solving anew each time is simply not economical. I found a way ...
0
votes
2answers
108 views

Double integral with variable in the limits

I'm trying to solve this integral: $$ ...
0
votes
2answers
315 views

Kramers Kronig Relation for Phase and Complex Reflectivity

I am a new user to Mathematica and I have been trying to figure out how to find $\Theta(\omega)$ from my 'experimental' values of energy and $\ln(\sqrt{R(\omega)})$ (I am just running a simulation, ...
0
votes
2answers
104 views

NIntegrate using Boole doesn't work

This doesn't want to work for me - I don't know why not. It usually gives me 0, but sometimes also a different number. I know it should be a small, non-zero number. ...
0
votes
1answer
79 views

Orthogonalizing polynomials with inner product depending on parameters

I need to orthogonalize the polynomials $h_n(x)=x^{2n}(1+x^2)^{-4S}$ with $x\in\textbf{R}$, $2S\in\textbf{N}$ and $n\in\{1,3,5,\ldots, 4S-1\}$ over the inner product $\langle h_n,h_m\rangle=32\pi ...
0
votes
1answer
542 views

Nested Nintegrate - two variable limits of integral

This is, so to say, the next part of the question: Nested NIntegrate - NIntegrate::inum: - error Now I define three functions: ...
0
votes
1answer
268 views

Nested NIntegrate problem

So I've been trying to evaluate the following integral in Mathematica 8.0 Student version: ...
0
votes
2answers
431 views

Why Can't Mathematica Integrate this?

I have the following problem from a textbook I am trying to integrate: So, following the directions in text, I am required to integrate each function. However, I cannot get Mathematica to integrate ...
0
votes
1answer
36 views

How can I fix my code so NIntegrate doesn't produce error message?

I get this error when trying to integrate a seemingly simple expression: ...
0
votes
1answer
40 views

NDSolve with arrays and Tables of Equations and WhenEvent

I've been toying around with NDSolve for a while, and read through the website. By doing so I discovered that I could use it for vectors and arrays with much pleasure. So I wanted to write a simple ...
0
votes
1answer
69 views

Multiple NIntegral with singularity

I need to compute the following integral FF[0]. When evaluating FF[0] Mathematica simply takes too much time. The problem may ...
0
votes
1answer
86 views

Initial and boundary value errors

NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> I keep getting this, ...
0
votes
1answer
114 views

Using NDSolve for three variables as function of time

I want to be able to plot z, and r. Should I be using DSolve, NDSolve or something else? I've tried to clear it up a bit Thanks, Will ...
0
votes
1answer
74 views

How to use NIntegrate in a function using parameters from a list

I would like to use NIntegrate in a function with some parameters from a list. I simplified my problem for this forum. The list of parameters is as follows: ...
0
votes
2answers
95 views

NDSolve boundary query / Extracting values from solution

I have a function $O_{2}$ with boundary conditions $O_{2}(r_{o}) = p_{o} $ and $O_{2}(g) = O_{2}'(g) = 0$. I plot it using the solver code below; ...
0
votes
1answer
161 views

How to improve the performance of this code

I have implemented a code in Mathematica 9 to simulate a scattering problem, and I got really disappointed about its performance when compared to Matlab. Since I am a newbie in Mathematica, would ...
0
votes
1answer
84 views

Transformation of the NDSolve result into new dependent variables

I have solved a set of coupled differential equations and now I need to convert them into different dependent variables and sketch their trajectories. Here is the code I have written so far: ...
0
votes
1answer
120 views

Fitting a Function With a Numerical Integral [duplicate]

I am having trouble using FindFit with the following function. ...
0
votes
1answer
81 views

PDE plotting assistance needed

...
0
votes
1answer
123 views

PDE Solving in mathematica

I'd like to ask how I might go about solving this equation: $\frac{\partial Ci}{\partial t} + \frac{1}{r^2}\frac{\partial (r^2 Ci)}{\partial r} = D\frac{1}{r^2}\frac{\partial}{\partial ...
0
votes
1answer
247 views

Syntax question regarding Triple Integrals in Mathematica

Integrate[1, {z, 0, 5}, {x, -Sqrt[ 9 - y^2], Sqrt[ 9 - y^2]} , {y, -3, 3}] 60 Sqrt[9 - y^2] How comes I am not getting a number for my final answer? This ...
0
votes
1answer
550 views

Can Mathematica solve integro-differential equations?

I have integro-differential equations like this: ...
0
votes
1answer
81 views

Order of evaluation in nested expression

I am trying to make a function that works as follows: Integrate 1 for all t in the interval $ [0,1] $ such that the first element of function vstar is positive. ...
0
votes
1answer
154 views

find derivative with defined function

s[a_, b_] := NDSolve[{y''[x] == y[x] Cos[x + y[x]], y[0] == a, y'[0] == 1}, y, {x,0, b}] I need to find the minimal of $\int _1^by[x]^2$ in the region ...
0
votes
1answer
150 views

Fast integration of 2D distribution across lines parallel to y-axis

I'm struggling with a small data set and a slow calculation. I have hundreds of small 2D data arrays and need to integrate across several lines parallel to the y-axis. Let me start with the data ...
0
votes
1answer
206 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: ...
0
votes
1answer
136 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 ...
0
votes
2answers
248 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
209 views

double integration

I want to evaluate a double integral, but the limits of one integral is a function of the second. Like this ...
0
votes
1answer
261 views

Integrate on a logarithmic grid

I am trying to solve numerically an integral equation, and from a couple of tests I can see that the result has a strong logarithmic divergence. For my specific problem it is very important to have ...
0
votes
1answer
282 views

Applying l'Hôpital's Rule to NDSolve with Piecewise Function

OK, so I've been working on this problem for over a week and it's driving me crazy. I'm trying to solve a system of two differential equations in $x(t)$ and $y(t)$ using a "time-elimination method," ...
0
votes
1answer
73 views

Error with minimization of NProbability

I'm trying to solve the following problem: ...
0
votes
1answer
509 views

Nested NIntegrate - NIntegrate::inum: - error

I have the problem quite similar as in: Nested NIntegrate I define two functions: ...
0
votes
1answer
112 views

How to change variable that has been defined in PDE?

I have a PDE function that contains a variable (named ka). I want to plot the result of my PDE in 1 plot using several different ka values. However, I'm not sure about how to write down this equation. ...
0
votes
2answers
204 views

System of ODEs specified by large coefficient matrices

What is the best way to call NDSolve for solving a system of differential equations of the form ...
0
votes
1answer
261 views

NDSolve event handler Question [closed]

I'm trying to plot a ball falling, hitting the ground and coming back up. without air friction, the equations for the system would be ...
0
votes
1answer
282 views

How to build a grid of integrand points and numerically integrate?

If I have some function I know numerically only, say f(x) and each point $x$ takes significant time to compute so I have them all stored in some file as f(1)=0.232423, f(1.1)=0.3243432,....Then is it ...
0
votes
1answer
327 views

singularity in NDSolve and Table command [on hold]

We are considering the following equations ...
0
votes
1answer
220 views

Problem with Eventlocator Method for NDSolve

I want to solve the ode and plot the solution v[x] for different values of parameter a where ...
0
votes
2answers
284 views

NDSolve and results of the previous computations

I want to solve following system of ODEs: $ \Bigg\{ \begin{array}{} \frac{\partial C}{\partial t}=\frac{2W_b}{Rsin(\theta)}(1-\frac{C}{\gamma})+\frac{\nu}{\pi R^2}\frac{\partial C}{\partial Z} ...