Questions tagged [numerical-calculus]

This tag is for various question on numerical calculus / numerical analysis which concerned with all aspects of the numerical solution of a problem, from the theoretical development and understanding of numerical methods to their practical implementation as reliable and efficient computer programs.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Numerical integration of an integrand including the dirac delta function

I have the following, $$\int_0^{2\pi} d\xi \, R(\xi) \, \delta[\mathbf{r} - \mathbf{R}(\xi)]$$ I need to evaluate this numerically on a series of grids. The dirac delta function serves to interpolate ...
0
votes
0answers
23 views

Find value for variable in a definite integral with given result of definite integral (numerical integration)

I need to compute a definite integral for example: $ \int_{0}^{\frac{\pi}{2}} k*cos(x) \,dx $ with variable k = 1 this definite integral is equal to 1. $ \int_{0}^{\frac{\pi}{2}} cos(x) \,dx = 1$ The ...
0
votes
0answers
15 views

A bound for the error $|(x-1)\ln x-P_3 (x)|$ in using $P_3(x)$ to approximate $(x-1)\ln x$ on the interval $[0.5, 1.5]$

I was wondering if someone could tell me how we can find a bound for the error $|(x-1)\ln x-P_3 (x)|$ in using $P_3(x)$ to approximate $(x-1)\ln x$ on the interval $[0.5, 1.5]$. I computed $P_3 (x)$ ...
3
votes
1answer
75 views

What computer methods are used to quickly calculate the $\zeta$-function (if any)?

So I can think of how I could compute $\zeta(\sigma + it)$ in principle. We can take $\zeta(\sigma + it)$ for $\sigma>1$ by the usual $\sum_{n} n^{-(\sigma + it)}$ summation. We can use the ...
1
vote
1answer
48 views

Newton's method in higher dimensions

To calculate the inverse of a quadratic matrix A, we could solve the equation $F(X):=X^{-1}-A=0$. I need to show that if X is invertable, then $DF(X)(\Delta X)=-X^{-1}\Delta XX^{-1}$ where DF(X) is ...
0
votes
0answers
22 views

Prove that p (x) is the interpolation polynomial on the points ...

Prove that p (x) is the interpolation polynomial on the points $ \begin{bmatrix} 0\\ 0\\ \end{bmatrix} \begin{bmatrix} 1\\ 0\\ \end{bmatrix}\begin{bmatrix} 2\\ 0\\ \end{...
0
votes
0answers
5 views

Mixed boundary conditions in a finite difference 2PDE

I have a 2nd order PDE wave equation for a grid of points in space and time: $$\frac{\partial^2u}{\partial t^2}=a^2\frac{\partial^2u}{\partial x^2}$$ I need to make a model according to finite ...
1
vote
0answers
42 views

Upper bound for the error of the gaussian quadrature$\int_{0}^{1} \log (1+\operatorname{sin} x) \mathrm{d} x$

I'm given the integral $\mathrm{I}=\int_{0}^{1} \log (1+\operatorname{sin} x) \mathrm{d} x$. Through the formula of Gaussian quadrature for 3 points, I can find an approximation to this integral. The ...
0
votes
0answers
39 views

For what start value does Newton's method converge?

I have the equation $f(x)=1/x-a=0$ and I need to find necessary and sufficient conditions for the start value $x_0$ so that the method converges. First I set up the sequence $x_{k+1}=x_k-\frac{f(x_k)}{...
-1
votes
0answers
48 views

find $a,b,c$ such that integration is minimum. [closed]

find $a,b,c$ such that $\int_{0}^{\pi/2}\left|ax^2+bx+c-\cos x\right|^2dx$ is minimum. My idea is using Polynomial interpolation, but i can't solve.
0
votes
1answer
48 views

Prove that Newton's method converges for x^2-p=0

Given the equation $x^2-p=0, p>0$, one has to show that Newton's method will always converge for every initial value $x_0>0$. I have found the sequence $x_{k+1}=x_k-\frac{f(x_k)}{f'(x_k)}=x_k-\...
0
votes
0answers
16 views

Approximate point through matrix and scalar product

I have the following optimization problem: Given a matrix $A=\left( \begin{array}{rrr} 3 & -1 & 0 \\ -1 & 2 & 0 \\ 0 & 0 & 2 \\ \end{array}\right)$ and a scalar product ...
2
votes
1answer
43 views

Verification of numerical convergence rates without reference solution and saturation effects

Currently, I'm developing a numerical method for the nonpolynomial Gross Pitaevski equation (NPSE) [1] in one spatial dimension \begin{eqnarray} i \hbar \partial_t &= -\frac{\hbar^2 }{2 m} \psi_{...
1
vote
2answers
57 views

Finding the error of $f''(x) \approx \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}~$

I'm having some trouble with the following exercise: Deduce the following approximation: $$f''(x) \approx \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}$$ for small values of $h$, and find an expression for ...
0
votes
0answers
10 views

Find the best approximation of 1/x regarding a scalar product using two other functions

I'm trying to find the best approxiamtion of the function $1/x$ through the functions $1$ and $x^2$ regarding the scalar product $\langle f,g \rangle = \int_{1}^{2} f(x)g(x) \,dx$. As far as I know I ...
1
vote
0answers
51 views

Derivation and Integration in polynomial spaces

My german numerical-calculus-book gives an example of integration and derivation in polynomial-spaces. But I do not understand the approach. Question 14.2 We have a polynomial with degree n and ...
0
votes
0answers
19 views

definition of order of a numerical integrator

I've seen two definitions of the "order" of an integrator for ordinary differential equations. The first (more common) one is that the method has order $k$ if the error introduced after one ...
1
vote
1answer
43 views

Inverse with Extended Euclidean Algorithm

I'm solving a task from https://www.coursera.org/learn/crypto/, particularly the following question: I know that 3x - 5 = 0 and since "ax + b = 0" that implies "x = -b * a^-1", ...
1
vote
1answer
31 views

Clarification on the definition of a symplectic integrator

According to the notes that I am reading, a numerical one-stop method $y_{n+1}=\Phi_h(y_n)$ is said to be symplectic if, when applied to a Hamiltonian system, the discrete flow $y\mapsto \Phi_h(y)$ is ...
0
votes
0answers
10 views

Using the remainder in Lagrange interpolation formula, find the maximum of $|q(x)|$ in $[0,1]$.

Let $q(x)=x(x^2-1)(x^2-4)(x-3)$. Using the remainder in Lagrange interpolation formula, find the maximum of $|q(x)|$ in $[0,1]$. I have no idea when using lagrange polynomial. I hope you can help me.
0
votes
0answers
24 views

How to iterate this operator?

As a helper to find saddle points of a Hamiltonian $H$ in $\mathbb{R}^2$, I came up with the following operator, which maps a point $P_n$ to a point $P_{n+1}$. The sequence $P_i$ for $i\rightarrow\...
0
votes
1answer
84 views

Round to n decimal places

So, let's say we want to evaluate $\pi$ using $\sum\limits^\infty_{n=0} \frac{4(-1)^n}{2n+1}$ (or any other series) correct to four decimal places. (i) Do we compare the series result to 3.1415 or 3....
0
votes
1answer
46 views

Using a successive double integration by parts show that the integral of $f(x)$ between $x_i$ and $x_{i+2}$ is equal the following expression [closed]

$f(x)$ between $x_i$ and $x_{i+2}$ is equal to this expression :" /> Show using a successive double integration by parts show that the integral of $f(x)$ between $x_i$ and $x_{i+2}$ is equal to this ...
1
vote
0answers
14 views

Asymptotic behavior near a singularity in DLVO interaction energies - Mayer function

I'm trying to solve the following integral numerically $\tilde{B}_{2}\left(\tilde{r}\right)=1-3\left(\frac{1}{\sigma}\right)^{3}\int _{1}^{\infty}\left(e^{-\left(\tilde{W}_{VdW}+\tilde{W}_{EDL}+\tilde{...
1
vote
0answers
9 views

Stationnay profile for diffusion-consumption equation in 2 dimensions with a point source

I'm looking for the stationnary solution of the following equation in 2 dimensions : $$\nabla^2 f(r)=f(r) $$ $$f(0)=f_c$$ $$f(+\infty)=0 $$ in radial symmetry. $\nabla^2$ corresponds to the Laplacian, ...
-1
votes
1answer
35 views

Finding an initial value in an ODE [closed]

Given an ODE, $y'(t) = f(t, y), t \in [a, b], y(a) = \alpha$, and a value I, find an $\alpha \in R$ so that the solution satisfies $\int_{a}^{b}y(t)dt = I$. Can someone explain to me what techniques I ...
0
votes
1answer
33 views

Nonuniform finite difference grid for a PDE where the x points depends on y coordinate

I'm currently working on a solution of a second-order nonlinear PDE adopting a finite difference approximation. For this, I'm using 5 and 9-point stencils in order to approximate the partial ...
0
votes
1answer
32 views

Computation of global error bound for Euler's formula [closed]

I am trying to calculate the global error bound for Euler's method, but I am having trouble. I am given the formula $|y(t_{i}) - u_{i}| \leq \frac{1}{L}(\frac{hM}{2} + \frac{\delta}{h})(e^{L(t_{i}-a)}-...
0
votes
0answers
16 views

How to determine error value needed to attain certain decimal precision with numerical integration

I need to use numerical integration to integrate a function $f(x)$ from $a$ to $b$ correct to $k$ decimal places. The two methods I am interested in are the Trapezoidal rule and Simpson's rule. I'm ...
0
votes
1answer
70 views

Computing the square root of complex number in a stable manner

The square root $\pm(u+iv)$ of a complex number $x+iv$ with $y\neq0$ may be calculated from the formulas $u=\pm\sqrt{\frac{x+\sqrt{x^2+y^2}}{2}}$ $v=\frac{y}{2u}$ compare the cases $x\geq0$ and $x<...
0
votes
0answers
15 views

Find a basis for $S(1,0)h[a,b]=\{p∈C0[a,b],p|Ii∈P1(Ii)\}$

On the intervall $[a,b]$ let $a = x_o< x_1 < x_2 < ... < x_n = b$ be a decomposition. Consider the Vectorspace of the piecewise linear functions $$S_h^{(1,0)}[a,b] = \{p \in C^0[a,b], p|_{{...
0
votes
0answers
29 views

Numerical analysis of a triangle area

The problem says if a triangle $ABC$ is considered such that $a\approx b+c$ then the Heron's formula fails due to problems with numerical stability. I have a small question about the proof I need to ...
1
vote
1answer
41 views

Error bound for non-composite Newton-Cotes formula

I am working on a question and I am stuck, wish to find some help. The question ask me to find the error bound for approximating the following integral by consider $n=4$ non-composite Newton-Cotes ...
0
votes
0answers
31 views

Simpson's method for numerical integration

Calculate integral $I=\int_0^1 \frac{dx}{1+x}$ using Simpson’s Rule so that an error is not greater than $5*10^{-3}$. First of all, I have to find $n$, number of even subintervals. $a=0$, $b=1$. $h = \...
0
votes
0answers
32 views

Lagrange interpolation polynomial

Are the coefficients of lagrange interpolation polynomials, in natural numbers? Because in every example that I solve, the coefficients are in natural numbers.
0
votes
0answers
35 views

How to prove that the error in Simpson's rule is $- \frac{(b-a)^5}{2880}{{f^{(4)}(\zeta)}}$? [duplicate]

Simpson's rule: $${\int\limits_a^b f(x) dx} \approx {\int\limits_{a}^{b} {p_2(x)} dx} = \frac{b-a}{6}{ \left( ...
2
votes
0answers
20 views

Taylor expansions for Adams-Bashforth Three-Step method

I am working on the following problem: Derive the Adams-Bashforth Three-Step method by the following method. Set y $(t_{i+1}) = y (t_i) + ah f (t_i, y (t_i)) + bhf (t_{i−1}, y (t_{i−1})) + ch f (t_{i−...
0
votes
0answers
23 views

Derive the Legendre differential equation given the recurrence relation

Given the 3-term recurrence relation $$(n+1)P_{n+1}=(2n+1)xP_n-nP_{n-1},$$ prove that $$(1-x^2)P''_n-2xP'_n+n(n+1)P_n=0.$$ I tried differentiate from both sides, but how can I get rid of the different ...
0
votes
0answers
40 views

Relative Condition Number for $\sqrt{x+1}-\sqrt{x}$

For a numerics problem, I have to find whether the function in the header is well-conditioned for large x with relative conditioning. In my understanding, I have to find the limit for x->inf of $\...
1
vote
0answers
87 views

Mixed derivative in numerical solution of PDE using splitting technique

I am trying to extend my knowledge on numerical solution of PDE, in this particular case I am learning to use splitting techniques as they provide simple approach to paralellization. However in the ...
0
votes
0answers
16 views

Proving Inverse Monotonicity of a Difference Operator

Following is a numerical scheme that uses the 5-point difference approximation for the Laplacian of an elliptic problem: \begin{equation} \mathscr{L}_hU_{l,m}=\begin{cases} \mathcal{L}_hU_{l,m}, ...
1
vote
0answers
90 views

How to interpret if $\sum_{j = 0}^{n} \frac {1}{j!}$ is a stable algorithm for computing $e$?

Crosspost I am trying to solve problem $15.1$ from Numerical Linear Algebra by Trefethen and Bau, which reads Determine whether the algorithm is backward stable, stable but not backward stable, or ...
1
vote
1answer
154 views

Convergence of the Picard iteration with an incorrect initial guess

Consider the system of differential equations $\boldsymbol{y'} = f(t,\boldsymbol{y}(t))$ subject to the initial condition $\boldsymbol{y}(t_0) = \boldsymbol{y_0}$. The Picard–Lindelöf theorem ...
0
votes
0answers
18 views

Do 1st and 2nd derivative tests hold on approximations?

I am characterizing response times for a solenoid/valve combination. The data I gather is a waveform of current drawn vs time. By way of the Savitzky–Golay filter I smooth the data using the 9 sample ...
2
votes
2answers
113 views

Solution of $(x-1)^x = x^{(x-1)}$

I was playing around with $$(x-1)^x = x^{(x-1)}$$ Which is equivalent to $$x^x = (x-1)^x.x$$ And, it seems this has one solution $x \approx 3.29317$ What is this number and how would one go about ...
4
votes
2answers
413 views

Equation of motion through the Lagrangian with Lagrange multipliers

I ask for advice, cause I'm a little confused. We have such a Lagrangian: $L=\frac{1}{2}m(\dot{x}^2+\dot{y}^2)-\lambda(x+xy+y-1)$ Here $\lambda(x+xy+y-1)$ is the constraint on the phase variables. I ...
0
votes
1answer
42 views

Numerical analysis fixed point iteration on $g(x) =x−af(x)−b(f(x))^2−c(f(x))^3$

I am not sure if I understand the following problem correctly nor if I am on the right path. Here it is, with my idea for a proof: Consider the fixed point iteration method $x_{k+1}=g(x_k)$, $k= 0,1,.....
0
votes
0answers
16 views

No. of significant figures in absolute value w.r.t true value and relative percentage error

To find the no. of a significant figure in absolute value $= 0.05411$ with respect to true value $= 0.05418$ and the relative percentage error. Here's my solution: But I ain't sure whether it's ...
0
votes
0answers
47 views

How to apply Savitzky–Golay filter with backward window?

I would like to use Savitzky–Golay filter on stock price to calculate derivative order 1 and order 2. The fact is that standard Savitzky–Golay filter relies on a central window for filtering So If I ...
0
votes
0answers
38 views

Which numerical method should I use that preserves solution's length?

I am trying to solve an IVP problem consisting of the following equations: $y_1'=Ay_2$ $y_2'=-Ay_1$ $y_3'=0$ The analytical solution considering $y(0)=\left[\begin{matrix}Csin(\theta)\\ 0\\ Ccos(\...

1
2 3 4 5
11