15 questions linked to/from Unexpected result of summation
430 views

### Why Gauss-Legendre Quadrature should keep the number of integral points less than about 50?

I wanted to use Gauss-Legendre Quadrature to calculate an integral as follows： When n=10 and some other number(except odd numbers),the numerical result is the same as theoretical result. ...
726 views

### Fredholm Integral Equation of the 2nd Kind with a Singular Difference Kernel

After reviewing the literature, I could not find an analytic solution to the equation $$\int^{1}_{0}dx\frac{f(x)}{|x-y|^{2/3}}=cf(y)$$ for $f(y)$, where $c$ is a constant and $y\in[0,1]$. I'm ...
375 views

### Is it possible to take a numerical (integral) average of the dependent variable, within NDSolve, at each iteration?

tl;dr: want to integrate (average) the dependent variable within NDSolve. I am currently trying to implement a basic diffusion-advection equation for a reactant, A. The species is converted between A ...
327 views

### How do I improve the style, efficiency, and versatility of this code?

I have a math problem that I have solved analytically. I now want to generate a number of graphs based on different parameter values. My problem is threefold: It takes a couple of minutes to produce ...
560 views

### Why Gauss-Legendre rule gives wrong result for piecewise polynomial function?

I implemented the Gauss-Legendre rule as follows: $$\int_0^1f(x)dx=\frac 1 2 \int_{-1}^1f(\frac{1+x}{2})dx=\sum_{i=0}^{4}A_if(\frac{1+x_i}{2})$$ ...
348 views

Observe that ...
1k views

### Two-dimensional catenary in Mathematica

I'm working in Mathematica to plot a 2-d catenary in Euclidean space according to this Math Stack Exchange Link, specified with a square Dirichlet boundary condition. Here's what I've coded using ...
1k views

### How can I invoke the solution of NDSolve to determine a parameter in my equation just inside NDSlove?

I am trying to solve a differential equation by NDSlove for $h(x,t)$. It reads $$h_t=h_{xx}-V_h-\lambda(t)$$ where $V_h$ is a given function of $h(x,t)$ denoted by <...
210 views

### A Trial Boundary Element Approach to Solving Integral Equation

I am trying to numerically solve an integral equation in Starfield and Crouch textbook (Boundary Element Methods in Solid Mechanics: With Applications in Rock Mechanics and Geological Engineering), ...
297 views

### How to handle this constant-interval integral in ODE?

The problem is to solve a system of nonlinear equations with a definite integral. $Q_i(x), i=1,2,3, x \in [-\text{max},\text{max}]$ \begin{align*} a_iQ_i''(x)-b_i(\vec{Q})-d_i\int_{-\text{max}}^{\text{...
675 views

### NDSolve: Couple PDE and ODE involving integral

I am trying to numerically solve an equation with NDSolve, where there is a ODE coupled to a PDE, like the following: ...
1k views

### gaussian integration

I'm new on Mathematica and I am an engeneer with only a little base of numerical computation. I have to integrate a trigonometrical function numerically with a Gauss integration. The function is: <...
581 views

### NonlinearModelFit runs too slow when fitting data to a function that does multiple numerical integrations

I have a function of several parameters defined in a module which does multiple numerical integrations. Then I try to fit that function to some sample data via with ...
95 views

### Stop iteration during solving of an Integral equation

I am trying to solve the following integral equation numerically in mathematica: $f(x) = 1 + \int_0^1 dy \left(1-3xy\right)f(y)$. The exact solution is $f(x)=\frac{8}{3}-2x$. I can get the desired ...
202 views

### Computing the coefficients for Gaussian integral [duplicate]

I wrote a small script to find the Gaussian integral points and weights: ...