Questions tagged [numerical-integration]

Questions on the use of numerical functions NIntegrate and NDSolve.

Filter by
Sorted by
Tagged with
5
votes
2answers
103 views

Volume integration with a condition

I have a set of parameters $x_1, \dots x_4 \in (0,1)$. I want to find the volume of the subregion of this 4d cube satisfying $$\sin^{-1}(x_1)+ \dots +\sin^{-1}(x_4) > \frac{3\pi}{2}$$ I've tried ...
1
vote
1answer
55 views

Speed up 2D numerical integration

The integral is not really complicated, but does not return a result in reasonable time ...
1
vote
0answers
27 views

Errors in NDSolve for complex matrices

This is the problem. It is quite simple, and looks unwieldy only because I had to rewrite quaternions as complex matrices. ...
2
votes
1answer
102 views

Plot nested integration of an InterpolatingFunction efficiently

Suppose we have an InterpolatingFunction from NDSolve ...
1
vote
2answers
133 views

Inaccuracy of the Difference between two $\chi^2$ Cummulative Distribution Functions

I have an algorithm which needs to calculate the difference of two Gamma distributions evaluated at some large values. I cannot do this over CDFs because they give $1$ if a large value is evaluated. ...
0
votes
4answers
112 views

How to evaluate that integral accurately and faster?

I've the following integral: $$\int_{-a/2}^{a/2}Cf(x)\sin{\frac{m\pi(x+0.5a)}{a}}\sin{\frac{p\pi(x+0.5a)}{a}}dx$$ where $$f(x) =53.62\cos^4\left(\frac{7\pi\sqrt{x^2}}{9}\right)+3.04\sin^4\left(\frac{...
3
votes
1answer
93 views

Mathematica unable to evaluate function which it can write explicitly in simple form

I have a function $\psi(x,n)$ in mathematica which is quite complicated. However, plugging in $n=0$ gives a simple form. Mathematica knows this (see below), however it is still unable to even evaluate ...
2
votes
2answers
53 views

How to use NIntegrate inside FindRoot?

I am trying to use FindRoot on functions that involve NIntegrate, and Mathematica is throwing undesirable errors even when it ...
2
votes
1answer
113 views

Why can't I solve a system of four third-order partial differential equations using NDSolve?

I solve the problem of optimal control. First, I solve a system of two equations (with respect to the variables p, q, V, n) with already optimal conditions (Kopt and Sopt) to check whether it is ...
0
votes
1answer
35 views

What does <<2>> mean in an output? Double Less than or greater than signs [closed]

An error in my output gives I am trying to understand what the issue is. I was wondering if this <<2>> has anything to do with it, because I don't know what that syntax means. Is <<2>> ...
1
vote
1answer
65 views

Cryptic NDSolve::nlnum when working with matrices

This problem was initially formulated in quaternions, but I had to rewrite them to complex matrices (as they seem to be supported better). Possibly introducing some errors along the way. So the ...
0
votes
1answer
33 views

Using interpolating polynomial inside NIntegrate

I have a PDE which I solve via ...
0
votes
0answers
23 views
0
votes
0answers
18 views

Evaluate integral at each point

I have an integral which Mathematica can't evaluate. The integrand is dependent on two variables. One of which is integrated over. The other is a variable: ...
1
vote
0answers
117 views

Coupled PDE equation or boundary condition creating singularity issue

Previous post: Using NDSolve and PieceWise for boundary conditions for coupled PDEs I realised that my previous post was a little vague so I hope this post clarifies any confusion. I've looked over ...
1
vote
1answer
66 views

Efficient way to evaluate numerically product sines functions

I'm trying to perform integration of the following matrix. ...
4
votes
4answers
184 views

Compute area between two ListPlot joined list (area filled by Filling -> {1 -> {2}})

Given two lists, how can I compute the area between their plots? (the blue region in the image below). The horizontal distance between points in the list can be assumed to be 1, as done by ...
3
votes
1answer
64 views

Same integral, NIntegrate gives two different results?

They're the same integral - the bottom integral is simply the top one split up using the identity $\log(xy) = \log(x) + \log(y)$. But the results aren't the same. Why? Code for top integral: ...
0
votes
1answer
21 views

export Nintegrate

I use the following NIntegrate to calculate my integral. When I use, Export, I get the f(r) value in the text file but not r. ...
2
votes
0answers
180 views

How to fit my data with following equation?

I have set of data of electronic specific heat ($C_{el}/\gamma_n T$) vs temperature ($T/T_c$). My fit equation is this $$\frac{C_{el}}{\gamma_n T}=-\frac{6}{\pi ^2}\alpha \frac{\mathrm{d} }{\mathrm{...
3
votes
3answers
79 views

Plot an Integral of NDSolve solution

I have a problem with plotting the integral of an NDSolve solution. I have attached the code for a simple 2nd order linear ODE to be solved by NDSolve and then to be integrated by NIntegrate. I ...
1
vote
1answer
29 views

Code ran until I closed the file and reopened it, now NIntegration gets stopped by a nonnumerical value

I ran this code earlier, and even saved a pdf of the plot. After closing the file and reopening it later in the day, I came to find that it will not run anymore (I truly think that I saved it before ...
0
votes
1answer
56 views

Integrate[x Tan[x], {x, -1, 1}] with NDSolve [closed]

I am trying to solve with NSolve Integrate[x Tan[x], {x, -1, 1}] and get the numeric value. ...
1
vote
0answers
55 views

Problems with a multidimensional principal value numerical integration

Multidimensional Principal Value Computation Hi all, I've been trying to work out a type of integral for... months? Years? I've scoured the documentation here, and tried several of the tips in other ...
1
vote
1answer
63 views

Plotting a vector field from spherical coordinates

I am trying to plot an integral that is in spherical coordinates, but I am a bit lost. I think that my only issue is converting to cartesian, everything I have seen on how to do this has gone a bit ...
4
votes
3answers
96 views

Perform a numerical constrained integration over $[-1,1]^3$

I would like an estimate of the three-dimensional volume lying within the cube $[-1,1]^3$ of the body defined by the constraints (the three variables being $t1, t2, t3$) ...
0
votes
3answers
61 views

More efficient way to NSolve for unknown within Integrate?

new to Mathematica. I am trying to approximate to ~30 decimal places $0<t<1$ satisfying $$\int_0^1 \frac{\sqrt{1-\sqrt x}}{\arctan(t + \arctan(x))} ~dx = \frac{\pi^2}{6}$$ I used the following ...
0
votes
1answer
79 views

Calculate sensitivities of differential algebraic equation

I would like to calculate sensitivities for a DAE. The DAE can be solved in Mathematica by: ...
1
vote
1answer
45 views

Catching NDSolve Singularities

I am using NDSolve to solve a system of equations with changing initial conditions (I'm using NDSolve multiple times). However, for particular initial conditions I am getting an effective step size of ...
0
votes
2answers
65 views

Shooting with updating BC's

So I have a 'fairly simple' problem that needs to be 'solved'. I have been able to solve this running 2 loops in Matlab but I am sure Mathematica should be able to handle this. I have the ODE $$F'(x)+\...
0
votes
0answers
29 views

NDSolve error when integrating two second order coupled ODEs

I want to plot a solution for a system of two second order coupled ODEs: ...
1
vote
1answer
66 views

Adjusting PrecisionGoal and AccuracyGoal when solving my equation using NDSolve?

Thanks for paying attention to my question and modifying my terrible formatting[facepalm], now I think I've found the answer. The point is the selection ...
1
vote
0answers
87 views

How can I get this integral to Compute

I'm trying to compute the following expression and get an analytical answer but Mathematica ends up spitting back the input expression. Hoping someone can shine some light on this. ...
6
votes
1answer
104 views

Nonlinear differential equation with unknown parameter and integral form boundary condition

I'm trying to solve numerically a non-linear problem in order to determine the velocity field ($U$) and the film thickness ($h$) of a non-Newtonian fluid over an inclined plane. The equations are, $$\...
4
votes
2answers
157 views

How to calculate volume under $ f(x, y) $?

I have the following function: σ = 0.3; μ = 5; cy =0; cx=0; f[x_,y_]=Exp[-(1/2)((Sqrt[(x-cx)^2+(y-cy)^2]-μ)/σ)^2]/(σ*Sqrt[2*π]) Plotting this with: ...
1
vote
0answers
33 views

Unexpected stiff system error [closed]

Let there be the following functions ya[t_, x_] := Cosh[t*x] za[t_, x_] := Sinh[t*x] wa[t_, x_] := x*Sinh[t*x]^2 One can verify that the following PDE's hold <...
1
vote
0answers
45 views

Numerical Artifacts in Schwarz-Christoffel (I think?) How to remove?

I have a problem that involves integrating a complicated Schwarz-Christoffel integrand. In order to test out my results so far, I've tried to give simpler integrands of the same type to Mathematica, ...
0
votes
0answers
69 views

A system of linear differential equations with variable (time-dependent) coefficients

I have searched almost all similar pages discussing a system of differential equations, but none of them discussed the case of variable coefficients. My problem is a bit more complicated, because ...
0
votes
2answers
38 views

Getting message NIntegrate::nlim when trying to integrate within a For-loop [closed]

I want to evaluate an integral that has integration limits x and 1. ...
0
votes
0answers
27 views

Inconsistency in complex line integral using 2 parameters vs 1 parameter

I am trying to numerically verify that, over a closed circular path, the line integral of a physics-inspired complex quantity $z_Q = P \cdot \frac{\partial}{\partial Q} S$ is the same regardless of ...
3
votes
1answer
101 views

Solving Piecewise Differential Equation using NDSolve (coupling at BC)

I am having some issues in dealing with a system of differential equations. I would like to solve a 1D diffusive heat equation across several regions with different material properties. I now have a ...
4
votes
1answer
55 views

Calculating the volume of a paraboloidal region

I have an inequality that defines a paraboloid. I would like to calculate the volume of the intersection of this paraboloid and a cylinder of radius R. ...
2
votes
0answers
89 views

How to do fast numerical integration, while using Cuba Library package: Vegas [closed]

I want to do the numerical integration with singularities. Although NIntegrate does the job, But it takes too much time, so i want to use the Cuba library that offers a choice of four independent ...
3
votes
1answer
247 views

2D Oseen equations

Background info: https://en.wikipedia.org/wiki/Oseen_equations ...
5
votes
1answer
138 views

NDSolve::femcmsd: The spatial derivative order of the PDE may not exceed two

I was in the impression that V12 can now handle higher order PDES but for this particular case it fails to produce any solution. ...
0
votes
1answer
65 views

Plot a family of solutions of ODE with singularity

In the post Use Mathematica to plot the flow of an ODE with discontinuity, the following ODE with discontinuous coefficient was solved ...
2
votes
0answers
101 views

Model 1D Vlasov Equation

Vlasov Equation The non-relativistic form of the Vlasov equation is given by: $$ \partial_{t} f\left( \mathbf{x}, \mathbf{v}, t \right) + \mathbf{v} \cdot \nabla f\left( \mathbf{x}, \mathbf{v}, t \...
1
vote
0answers
67 views

How much can we trust NIntegrate when NIntegrate::eincr is shown? [closed]

I have been dealing with a high oscillation integration using NIntegrate. The warning of eincr shows that no matter how large (X)...

1 2 3 4 5 47