Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [numerical-methods]

Questions on numerical analysis/numerical methods; methods for approximately solving various problems that often do not admit exact solutions.

0
votes
0answers
5 views

Numerical solution of a second-order non-linear PDE

I'm interested in solving the following non-linear terminal value problem $$ 0 = \frac{\partial u}{\partial t} + \frac{1}{2}\sigma^2x \frac{\partial^2 u}{\partial x^2} + \lambda(x_0 - x)\frac{\partial ...
0
votes
0answers
10 views

Explicit wave-package solution of the Klein Gordon equation

I need to generate initial for a 3D Klein Gordon (KG) solver. Therefore I'm interested in physical meaningful wave-package solutions. By considering the free KG equation \begin{equation} \Box \psi(t,x)...
2
votes
0answers
12 views

Efficient approach for solving matrix plus diagonal matrix system that varies in time

When solving a system of ODEs, as part of a preconditioner, I get the system $(A + D(t))x = b(t)$ where $A$ is a sparse matrix and $D(t)$ is diagonal. I'm currently solving this by taking the LU-...
0
votes
0answers
15 views

Jacobian for a semi linear differential equation problem

How would I find the jacobian in this case? Normally the Jacobian is calculated using partial derivatives of F with respect to each of the variables, but since we are using the centered finite ...
0
votes
0answers
14 views

Good book for Runge-Kutta (and Rosenbrock) methods

I recently began to study "ROSENBROCK METHODS" for solving DAEs. I've learned rooted trees from the book Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems. I'm ...
1
vote
1answer
34 views

Error in midpoint approximation to the integral

Suppose $f''(x) \geq 0$, I want to check that $$ \sum_{j=1}^k (x_j - x_{j-1}) f (c_j) \leq \int\limits_a^b f(x) dx $$ where $x_1,x_2,...,x_k$ are nodes of $[a,b]$ sothat $x_j = a + j (b-a)...
0
votes
0answers
20 views

Finite difference for non-uniform unstructured mesh/stencil

Below I have shown my non-uniform unstructured mesh (as in there is no pattern between the relative size of $h_i$ and $h_{i+1}$ etc. I've made the following equations using nodes $i-1$, $i$, and $i+1$...
2
votes
2answers
71 views

Is there a polynomial (or series) expression for summing $S_d(a,N)=\sum_{k=0}^{N-1} \log(1+{1\over a+k \cdot d})$? (perhaps Bernoulli-type)

I need a quickly evaluatable expression for sums of consecutive logarithms of the type $$ S_{d}(a,N) = \log(1+ {1\over a})+\log(1+ {1\over a+d})+\log(1+ {1\over a+2d})+ \cdots + \log(1+ {1\over a+(N-1)...
1
vote
0answers
29 views

Numerical solution to 2D nonlinear PDE

I am struggling to numerically solve the second-order nonlinear PDE for $f(x_1, x_2)$ of the form: $$0 = f + f^2 + f_1 + f_2 + f_{11} + f_{22}$$ I tried several functions from Matlab and Mathematica, ...
0
votes
1answer
36 views

fixed point function (nonlinear equation)

here's the following problem, I'm trying to find a real root by fixed-point iteration method but I can't find a properly $g(x)$ that meets the condition that $|g'(x_0)|<1$. Well, my nonlinear ...
1
vote
0answers
30 views

Implicit Euler method yields incorrect output - in depth and simple

We are given the system of PDEs $\begin{pmatrix}f_t \\ g_t\end{pmatrix} = i\begin{pmatrix}0 & 1 \\ 1 & 0\end{pmatrix}\begin{pmatrix}f_{xx}\\ g_{xx}\end{pmatrix}+i\begin{pmatrix}3 & -1 \\ -...
0
votes
1answer
20 views

Rewriting product of special rank one updates as a low rank update

I'm trying to improve the speed of the following iteration to calculate $s_k$: $$B_k^{-1} = \Bigg( I + \frac{s_{k}s_{k-1}^T}{||s_{k-1}||^2}\Bigg)...\Bigg(I+ \frac{s_1s_0^T}{||s_0||^2}\Bigg) B_0^{-1}\\...
0
votes
0answers
9 views

Discretization Dirichlet boundary condition for Elliptic PDE with finite volume method

I want to discretize the following equation using FMV: $$\nabla \cdot (a(x)\nabla u)=f(x)\\x\in \Omega \subset \mathbb{R}^2 \\u_{|\partial\Omega}=g$$ To this end, let $V_i \subset\Omega$, $i=1,\dots,N$...
1
vote
3answers
42 views

Fixed point for a function. Numerical Analysis.

how might g defined such that the root of $f(x)=x^3-3x-1$ is a fixed point of $g$, for $x$ in the closed interval between $-\frac{1}{2}$ and $0$. Find two distinct functions $g_1$ and $g_2$ and ...
0
votes
1answer
43 views

finding perfect squares solutions for the following case

I was working on a number theory problem and create a equation. I tried research on this, but tbh I don't even know what should I google for... Here's my cases. $$n = \sqrt{N * \frac{1+\sqrt{4k^2+1}}...
0
votes
2answers
50 views

The uniqueness of Hermite's interpolating polynomial in the case of $n=2$ nodes

The problem is : I have tried to prove the problem using proof by contradiction. However, I got stuck. I am not sure which role the derivatives of the function $p$ and $f$ should play, or how we ...
1
vote
1answer
43 views

Equations or areas where $(AA^T)^x$ or $(A^TA)^x$ are used as applications

Let $A$ be square or rectangular and $x\in \mathbb{R}$. Can you point me to equations/areas out there where $(AA^T)^x$ or $(A^TA)^x$ or their eigenvalues are used as applications? e.g. we find them in ...
0
votes
0answers
19 views

Adams Bashforth/Moulton, Numerical scheme in multi step method

There is this question that has bothered me for a while. For example, when we do numerical method in differential equation, namely the multi step method to approximate some solution of a DE, we can ...
0
votes
0answers
16 views

When can one trust that an adaptive quadrature scheme is not missing nontrivial areas of the domain?

hcubature http://ab-initio.mit.edu/wiki/index.php/Cubature_(Multi-dimensional_integration) seems to be a useful package for computing multidimensional integrals numerically. However, I have come upon ...
-1
votes
0answers
20 views

Choosing one solution technique for different differential equations

I'd like to choose one solution technique and write the finite difference form of the solution. Can you please explain how that leads to the next estimate(s), the accuracy of the method, and why you ...
-1
votes
0answers
16 views

Newton-Cotes formula 1 [closed]

hi I am looking for proof of theory of newton cotes formula integral in detail
0
votes
0answers
32 views

Any methods to solve this system of ODE when the RHS is unknown?

Solve $$\eta_k\frac{d^2C_k}{dz}(z)=-e_k, k = 1,2,3$$ $$C_1(0)=0, C_2(0)=A, C_3(0)=0$$ $$C_1(L)=B, \frac{dC_2}{dz}(L)=0, \frac{dC_3}{dz}(L)=0$$ with $$e_1 = -\beta_1-\beta_3$$ $$e_2=-\beta_1-\beta_2$$ ...
1
vote
2answers
25 views

Euler's method for second order differential

Given the differential: $y'' + y' - y = x$ , $y(0) = 2$ , $y'(0)=1$ I am asked to calculate $y'(2)$ for (a) $h=2$ and (b) $h=1$ I have used Euler's method for a second order differential so I am ...
0
votes
1answer
31 views

Taylor series of product of functions

If $f$ and $g$ have the Taylor expansions given by $$f(x) = f_{0} + f_1x + f_2x^2 + \mathcal{O}(x^3), $$ $$g(x) = g_0 + g_1x + g_2x^2 + \mathcal{O}(x^3), $$ is it possible to find the Taylor ...
1
vote
0answers
24 views

If $A$ is an upper-triangular matrix of size $N$, how many multiplications/divisions are necessary to solve $Ax = y$?

I need help understanding the solution. Here it is: Solution. Starting from the last row, one has $x_{N} = y_{N}/A_{NN}$, which requires one division. At row number $i$, one has $x_{i} = (y_{i} - \...
0
votes
1answer
30 views

Show that a given function exists

Consider a sequence $x_{k + 1} = f(x_{k})$, where $f \in C^{3}$. Moreover, assume $f(0) = f'(0) = f''(0) = 0$. Show that there exists a continuous function $g$ such that $$|x_{k+1}| \leq g(x_{k})|x_{...
0
votes
0answers
13 views

stability for 2D crank-nicolson scheme for heat equation

We have parabolic 2D pde \begin{align*} v_t &= \nu (v_{xx} + v_{yy}) + F(x,y,t), \; \; \; (x,y) \in R, \; t >0 \\ v(x,y,t) &= g(x,y,t), \; \; \text{on} \; \partial R, \; t>0 \\ ...
0
votes
0answers
16 views

Newton's Interpolating Divided Difference Polynomial (MATLAB)

I'm trying to construct a polynomial in MATLAB using Newton's Interpolating Divided Difference Formula, and in doing so, generalize it to any size vector x and y. So far i was able to obtain the ...
0
votes
0answers
56 views

How did they simplify this floating point expression?

Assume $D_hf(x) = \frac{f(x+h) - f(x-h)}{2h}$. Suppose $f$ can be evaluated with relative error bounded by $\epsilon$. Show that floating-point arithmetic with machine epsilon $\epsilon$ gives $...
0
votes
0answers
41 views

In this constrained minimization problem, should the Lagrange multipliers be positive?

Consider the following (real, block ?) matrix $Z_{n\times k+1}=[1_{n\times 1},X_{n\times k}]$. Note how $z\equiv v^TZZ^Tv$ can be written as: $v^T11^Tv+v^TXX^Tv=v^TJ_nv+v^TWv$, where $J_n$ is a unit ...
1
vote
2answers
51 views

Expanding $\frac{1}{1-x}$

Is there any kind of expansion of $f(x)=\frac{1}{1-x}$, possibly with polynomials, such that with only a few terms I can represent with an error smaller than $10\%$ the function over the interval $[0, ...
1
vote
1answer
33 views

Fast method to solve transcendental equation for a range of parameters?

I have an equation of the form $t + e^{Ax} + e^{Bx} = 0$ This is a transcendental equation, and I would use a Newton-Raphson algorithm or uniroot in ...
0
votes
0answers
12 views

General Chebyshev approximation

I am having trouble understanding it, first of all, what is x? Are x's coefficients of this polynomial we are looking for? This would mean that the polynomial is of degree $n-1$ because it has n ...
1
vote
0answers
34 views

Numerically find the function that maximise a probability

I have a sample consisting of $N$ data for the function $$g(\nu) = \int\limits_0^{\infty} \cos{\left(\nu x\right)} f(x) \,\mathrm d x$$ and I want to solve the integral equation for $f(x)$ ...
0
votes
0answers
8 views

Verify that the recurrence formula for the general second order Runge-Kutta method is $y_{i+1}=y_i+h_i[(1-\beta)k_1+\beta k_2]$

We look forward the discretization formula $$ \frac{y_{i+1}-y_i}{h_i}=\eta_i f(x_i,y_i)+\beta_i f(x_i+\gamma_i h_i, y_i+\delta_i h_i),........(1)$$ where $\beta_i, \gamma_i, \delta_i, \eta_i$ are ...
-2
votes
0answers
26 views

Estimate the first derivative of $f(x)=\ln x$ at $x=1$ using the second order central difference formula.

Estimate the first derivative of $f(x)=\ln x$ at $x=1$ using the second order central difference formula. I was having problem solving this question. Can anyone illustrate the exact formula or second ...
3
votes
1answer
33 views

Adding artificial dissipation to continuity equation

I'm trying to solve the system of equations that relates to blood flows in arteries i.e. flow in elastic tubes. The system looks as follows $$\frac{\partial A}{\partial t}+\frac{\partial\left(Au\...
0
votes
0answers
17 views

Why is there noise for higher bandwidth intensity distributions?

I have been trying to computationally evaluate the following E-field computationally: It is basically the sum of waves of a given wavelength, weighted by the square root of a gaussian distribution ...
0
votes
0answers
29 views

Numerical method for fitting 2D data in regular rectangular mesh

I'm implementing a system, that is receiving on the input imprecise (due to various external influences) coordinates in 2D. My goal is to assign to each coordinate position in regular rectangular mesh....
0
votes
0answers
7 views

Discrete entropy inequality for hyperbolic system

We know that any conservative and consistent numerical scheme for the hyperbolic system $$U_t+F(U)_x=0$$ where $U:\mathbb{R}\times \mathbb{R}^+ \rightarrow \mathbb{R}^n$ converges to a weak solution. ...
2
votes
1answer
34 views

Recovering a matrix from a linear ODE given observations

To make this simple, let's say we have $x: \mathbb{R} \rightarrow \mathbb{R}^2$ such that $$\frac{d}{dt}\vec{x}(t) = \begin{pmatrix} x_1'(t) \\ x_2'(t) \end{pmatrix} = A \vec{x}(t)$$ for some constant ...
0
votes
1answer
25 views

Maximum interpolation error in lagrange interpolation.

I have the following question: And the following Lagrange interpolation error bound: The way I have started to solve the problem is as follow. For me as a worst case is when all infinitely close to ...
-1
votes
0answers
47 views

How to estimate reciprocals when division is not allowed.

(Neumann’s series as a fixed point). Let $a$ be a positive real number, find a sequence $\{x_{k}\}$ which converges to $\frac{1}{a}$ and can be computed without any divisions. [Hint: Think of a ...
0
votes
1answer
16 views

Finite Element in space, finite difference in time, stability analysis

I was wondering how to do stability analysis for the classical wave equation if we discretize in space with finite element and step forward in time using some explicit scheme like for example leapfrog ...
2
votes
0answers
10 views

Discretisation of 2D Poisson equation in Sylvester matrix form

I am working on fast Poisson solvers and I have to understand some basic concepts with the discretisation of the 2D Poisson equation ($U_{xx}+U_{yy}=f$) in the Sylvester equation form ($KX+XK=F$). I ...
2
votes
1answer
41 views

Why is this implementation of the Lax-Friedrichs scheme so dissipative?

I needed a numerical solver for the advection equation in 1D. So I decided to implement the Lax-Friedrichs scheme in Matlab like so: ...
0
votes
0answers
29 views

Using Adams-Bashforth-Moulton Predictor Corrector with Adaptive Step-size

I'm investigating the behaviour of predictor-corrector methods to numerically give approximations to the Initial Value Problem. I have currently implemented a Forward-Backward euler method like so, $...
1
vote
0answers
16 views

Complex dynamical system: check stability of point numerically

Given a dynamical system described by the equations (for i=1,...,N) $$\frac{d y_i}{dt} = P_i - by_i + K \underset{i \neq j}{\sum_{i=1}^N} \sin(x_i-x_j)$$ $$\frac{d x_i}{dt} = y_i$$ Say that I have ...
0
votes
0answers
20 views

expanding taylor series with respect to different point

Suppose we have $v(x,y)$ any function cont differentiable. Write $v_k^n = v( k \Delta x, n \Delta y )$. Notice that using taylor series about point $(k \Delta x, n \Delta y)$, we can write $$ v_{k+1}...
0
votes
1answer
25 views

What should be the maximum value of $h$ so that the upper bound of

What should be the maximum value of $h$ so that the upper bound of the error of approximated value of $\int \dfrac {dx}{x^2}$ using Composite Trapezoidal Rule is within $10^{-3}$? The limit of ...