# Tagged Questions

Questions on the use of numerical functions NIntegrate and NDSolve.

2answers
577 views

### How to solve the differential equation with Duhamel's integral?

How do I solve a differential equation with Duhamel's integral? I tried to solve it with NDSolve, but failed: ...
2answers
2k 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: ...
0answers
113 views

### Using indexed array elements as integration dummy variables with EvaluationMonitor. Bug?

As part of a routine that must cope with integration of varying numbers of dimensions, I would like to use indexed variable names (e.g., x[0], x[1],...) as dummy integration variables. However, it ...
1answer
80 views

### Assymptotically Solving ODE with free parameters

I have a first order ODE, $F(y[x], y'[x], A, B) = 0$. I want to solve this numerically (with the boundary value $y[1] = i$ ) but also with the following requirements: A and B are free parameters which ...
0answers
84 views

### NIntegrate fails to converge around a value out of integration range

This is the function that I am trying to integrate, I have interpolated it for best results (would rather not): There is a 'singularity' around 0, but I get the warnings and bad results even when ...
0answers
54 views

### Integration problem: lrgexp

I want to calculate the following integration but it gives the error PolynomialGCD::lrgexp: Exponent is out of bounds for function PolynomialGCD. The code is: ...
1answer
567 views

### Plotting NIntegrate

Plot[E^(-0.5 x) NIntegrate[Cos[t] E^(Cos[t] + 0.5 t), {t, 0, x}], {x, 0, 40}] Mathematica evaluates this integral for each point, which takes a long time. It is ...
1answer
301 views

### Approximate $h$ in $F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$

Consider $$F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$$ $$|z|\le L$$ $$0 \le \theta \le \pi$$ By having knowledge of $F(\theta)$, how can one approximate $h(z)$? In ...
1answer
848 views

### Use Euler method to solve differential equation

Use Euler's Method or the Modified Euler's to solve the differential equation ${dy/dt=y^2+t^2-1, y(-2)=-2}$ on $[- 2, 2]$. Take h = 0.2 (...
2answers
541 views

### Plotting several numerical solutions plus the analytic solution of ODE in one plot

I want to be able to plot several numerical solutions of an ODE, plus its analytical solution in one plot, in order to see how the numerical solutions converge towards the analytical one with respect ...
1answer
1k views

### Euler's method for system of differential equation

I need to program Euler's method to solve a system of two diffferential equations of first order. Fist, I have programmed the Euler's method for just one differential equation: ...
1answer
807 views

### NestList and Euler's method

I am new to mathematica and so just experimenting with various programming constructs. Recently have been looking at NestList and how I could use this to implement ...
1answer
237 views

### Precision of NIntegrate

At the moment I am considering a "difficult", highly-oscillatory integral in Mathematica. It calculates the integral without any complaints. However, I am also trying out a numerical method with which ...
2answers
149 views

### Plot3D and NIntegrate issues

f[x_, y_] := 2*x - y Plot3D[f[x, y], {x, -1*Sqrt[4 - y^2], Sqrt[4 - y^2]}, {y, -2, 2}] NIntegrate[f[x, y], {x, -1*Sqrt[4 - y^2], Sqrt[4 - y^2]}, {y, -2, 2}] I ...
1answer
219 views

### Evaluation of the second argument to NIntegrate

The expression Integrate[x^2, Flatten[{{x},{1,2}}]] evaluates properly, to $\frac{7}{3}$. However, ...
1answer
150 views

### Integrate and NIntegrate yield different results for double integral

Evaluating a double integral with bivariate normal distribution yileds widely different results depending on the method used. I define a bivariate normal distribution with ${10, 3}$ and ${8, 1.5}$ as ...
2answers
321 views

1answer
137 views

...
2answers
132 views

### Integral too oscillatory

Is there any way top make this integral less oscillatory? ...
0answers
70 views

### Integration is unevaluated analytically after a variable removed

I am using Mathematica 9.0 to do a symbolic integration as follows: ...
0answers
170 views

### The idea behind Stiffness switching method with NDsolve [closed]

Does the Stiffness switching method with NDsolve switch just between multiple variants of 4th order Runge Kutta method or it uses also other methods?
1answer
68 views

### How to NDSolve a set of equations, one of which itself contains NIntegrate of a desired function?

How to NDSolve a set of equations, one of which itself contains NIntegrate of a desired function waited to be solved by NDSolve first? For example, ...
1answer
111 views

### Why isn't Table iterator value inserted in failed NIntegrate arguments?

Consider this simplest example: Table[{z, NIntegrate[f[x], {x, 0, z}]}, {z, {1}}] Here f is not defined, so ...
2answers
513 views

### Starting NDSolve from intermediate time step?

I always wondered if I could start NDSolve from an intermediate time step. What I mean is, in the code sample below, if I were to run my solution from ...
2answers
95 views

### Fix my code to return a table of values

Here is a “procedural” program that we wrote in my class, implementing the rectangle rule of numerical integration: ...
3answers
306 views

### NIntegrate-ing a compiled function

I'm trying to integrate numerically in 6 dimensions a very long expression and I read about the option to NIntegrate a compiled function which should be faster. ...
0answers
361 views