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.

8
votes
1answer
117 views

Multi-Gaussian Integrals with Heaviside for cosmic connectivity

Context I would like to predict the connectivity of the so-called cosmic web in arbitrary dimensions. This is the cosmic web (in a hydrodynamical simulation) The little wiggly things are galaxies (...
0
votes
2answers
69 views

I really don't understand “The Shooting Method”

I am attempting to learn from a textbook that has the following question: The boundary-value problem $$ y'' = 4(y-x), \qquad 0 \leq x \leq 1, \qquad y(0)=0, \, \, \, y(1)=2 $$ has the ...
0
votes
1answer
24 views

Standard Runge-Kutta method, consistency order

Show that the explicit standard Runge-Kutta method with the process function $\varphi(t,y,h)=\frac16 (f_1+2f_2+2f_3+f_4)$ $f_1=f(t,y)$ $f_2=f(t+\frac{h}2,y+\frac{h}2f_1)$ $f_3=f(t+\...
0
votes
2answers
20 views

What is meant by tridiagonal linear equation system?

I have to implement the SOR (Successive Over-Relaxation) method, using sparse matrices, to find the solution vector of these linear equations systems (for quite huge matrices): What does that tridiag(...
6
votes
2answers
7k views

Comparison of Newton-Cotes Quadrature and Gaussian Quadrature formulas

Newton-Cotes quadrature formulas are a generalization of trapezoidal and Simpson's rule. The trapezoidal rule involves $2$ points, Simpson's rule involves $3$, and in general Newton-Cotes formulas ...
5
votes
1answer
114 views

Removable singularity in $\phi(\vec{x})=\int \left[\phi\frac{\partial (\ln r)}{\partial n} -\ln(r) \frac{\partial \phi}{\partial n}\right] ds$

If I have the following integral equation $$\phi(\vec{x})=\frac{1}{\pi}\int \left[\phi\frac{\partial (\ln r)}{\partial n} -\ln(r) \frac{\partial \phi}{\partial n}\right] ds$$ An approximate solution ...
1
vote
1answer
66 views

Determine the variables so as to make differential equation has global error of order 3

Determine $\alpha, \beta$ and $\gamma$ so that the linear, multistep method $$ y_{j+4} - y_j + \alpha (y_{j+3} - y_{j+1}) = h [ \beta (f_{j+3} - f_{j+1}) + \gamma f_{j+2} ] $$ for the d.e....
4
votes
3answers
1k views

How bad, really, is the bisection method?

We know that the bisection method for root finding is slow (linear convergence), but has the advantage of always working for a continuous function, if we start with a interval which brackets the root. ...
0
votes
1answer
46 views

How can find Euler approximation to the solution of an ODE?

How can I find the Euler appproximation $x_2$ at $t=2h$ to the solution $x$ of the intial value problem $$\frac{dx}{dt}=2x+t+1, \qquad x(0)=7$$ I know $x_1= 7+15h$, but how can I calculate $x_2$?
1
vote
2answers
889 views

Practical applications of Graeffe's root finding method

What are the practical applications of Graeffe's root finding method? I searched a lot but couldn't find any. I found that it is used in aerodynamics and electric circuit analysis. But I don't know ...
0
votes
0answers
16 views

Numerical Double Integration with inverse over inner integral failing using common methods and inbuilt functions

Implementing a paper, I want the value of this double integral which has endpoint singularities in both integrals. $\int_0^{\inf} \frac{1}{w} Im( 0.5^{-iw}({12{\int_0^1 (1 - (0.5+\frac{0.5} {1+by^\...
1
vote
0answers
17 views

prove $ ||u||_{L_2(\Gamma)} \leq (2||v||^2_{L_2(\Omega)} + 2||v||_{L_2(\Omega)} ||\nabla v||_{L^2(\Omega)})^{\frac{1}{2}}$

$$ ||u||_{L_2(\Gamma)} \leq (2||v||^2_{L_2(\Omega)} + 2||v||_{L_2(\Omega)} ||\nabla v||_{L^2(\Omega)})^{\frac{1}{2}}$$ for all $u \in H^1(\Omega)$ for the open unit circle $\Omega$ in $\mathbb{R^2}$. ...
1
vote
0answers
22 views

Euler's method to solve a differential equation

Apply Euler's method on the initial value problem $y'(t)=y(t)$ with $y(0)=1$ (in the interval $[0,1]$) and equidistant grid $I_h$, $h=\frac1n$. Give the approximation $y_h$ explicitly. This question ...
2
votes
1answer
43 views

Is it a valid claim that ODEs are easier to solve numerically than PDEs?

My final project in my Partial Differential Equations class involved studying one non-linear PDE in depth. In reading about my equation, I've realized that PDEs of 3 spatial variables can be re-...
-1
votes
0answers
14 views

zero flux boundary condition

I need to proof horizontal divergence with the zero flux boundary conditions such that \begin{equation} \boldsymbol{\nabla} \cdot \mathbf{u} = 0 \end{equation} where $\mathbf{u}=(u,v,w)^T$ and each ...
0
votes
0answers
38 views

Test if a function is continuous or has at least one discontinuous vertical asymptote between an interval

Imagine evaluating a function with little intervals incrementally across a graph and testing by using the end points of the each interval (and maybe a midpoint), whether the function is continuous for ...
1
vote
1answer
39 views

How to solve a non linear ODE with Newton's method?

Im trying to solve this ODE using the Newton method (for non-linear equations using Jacobian Matrix): $u(0) = u(L) = 0$ (let's take $L=9)$ $T=500$ $K= 5 \times 10^9$ $w = 100$ $u''$ and $u'(x)$ ...
2
votes
2answers
48 views

fixpoint iteration to solve $y'(t)=y(t), y(0)=1$

Solve the initial value problem $y'(t)=y(t)$, $y(0)=1$ on the interval $[0,1]$ with a fixpoint iteration of the operator $T: Y\to Y, (Ty)(t):=y_0+\int_0^t f(s,y(s))\, ds$. Begin with $y_0(t)=0$ and ...
0
votes
0answers
7 views

Is that a Neumann condition or a Dirichlet?

In a such problem: $\ u''''=f $ with boundary conditions: $\ u'(0)=u''(0)=u'(1)=u'''(1)=0$ Is $\ u'(0)=0$ and $\ u''(0)=0$ Neumann conditions or Dirichlet conditions ?
0
votes
0answers
26 views

How to solve a matrix dominated by zeros?

I am trying to solve a matrix of this form: Is there a known algorithm or a method to solve this kind of matrices more efficiently than a normal Gauß elimination method? I input the diagonals as ...
2
votes
0answers
27 views

Finding the real roots of a univariate polynomial on the interval [0,1]

I have numerous, univariate polynomials with degree in excess of 100 and with very, very large coefficients (Here's an example coefficient ...
4
votes
1answer
147 views

Integrating sine with Monte Carlo / Metropolis algorithm

I'm learning Monte Carlo / Metropolis algorithm, so I made up a simple question and write some code to see if I really understand it. The question is simple: integrating sine over 0 to PI. The ...
-1
votes
0answers
6 views

Matlab Code for Robin and Neumann boundary for ode. [on hold]

please can someone help me out. i need the matlab code for Robin and Neumann boundary condition for ode not pde.
0
votes
0answers
13 views

Motivation of Milstein scheme

Milstein scheme is motivated by improving the convergence speed sigma terms of Euler scheme. where sigma and mu is globally Lipschitz continuous$$t_i=\frac{T}{n}i\quad dX_t=\mu(X_t)dt+\sigma(X_t)dW_t$$...
0
votes
0answers
8 views

How to use Finite Difference Method solving ODE with Boundary Value Problems?

Using these formulas, it is clear how to solve the problem: For node 1, we have the boundary value on the left side, for ex. u(0) = 0 and for node 2, we use the formula replacing u'' with u_i-1 = (...
1
vote
2answers
674 views

PYTHON RK2 (Midpoint Method)

Good evening, I am writing code for a Numerical Analysis Project, but I am having difficulty iterating the RK2 (Midpoint Method) Correctly. I am using Python to do it, could anyone take a look at my ...
1
vote
0answers
16 views

How to implement Finite Difference Method ODE Boundary Value Problem in Python?

I implemented the Finite Differences Method for an ODE with Boundary Value Problem. Here is the approximations I used for the FDM: And here is the balk problem: with u(0) = u(L) = 0 (attached on ...
0
votes
0answers
12 views

Conceptual question on conditional expectations for numerically solving Backward SDEs

I am starting to study the field of Backward Stochastic Differential Equations (BSDE) and have a conceptual question on numerical techniques to solve them. BSDE are of the form: $$Y_t=F((B_s)_{0\leq s\...
0
votes
0answers
23 views

Matlab Code to solve Matrix Differential Riccati Equation with Terminal constraint

I am new to the theory of MDRE and the following came up while I was going through the text by Dockener(2000)(page 181). They mention that the following coupled Riccatti equations can be solved '...
0
votes
1answer
1k views

Estimating the multiplicity of a root (numerically)

I'm working on a modified root finding script that uses the Newton method, but with a modification such that I estimate the order of the root to get faster convergence. The basis of my motivation is ...
2
votes
2answers
3k views

Quadratic Function must be positive definite to have a unique minimum

I have attempted the following question multiple times and I am very confused about the proof please help me solve it. Let $V(x)=a+b^{T}x+\frac{1}{2}x^{T}Cx$ for some $a \in \mathbb{R}, b \in \mathbb{...
0
votes
1answer
435 views

Lagrange 2nd dregree interpolating polynomial

Given these set of points: I must find the interpolating polinomial and find the value $0.32$ Using the Lagrange formula, I did: $$P(x) = a\frac{(x-0,3)(x-0,4)}{(a-0,3)(a-0,4)}+b\frac{(x-0,3)(x-0,4)...
2
votes
0answers
26 views

System of hyperbolic equation

Suppose we have the system $$ \begin{cases} u_t + av_x = 0 \\ v_t + b u_x =0 \end{cases} $$ where $a,b \in \mathbb{R}$. If we write this in the form ${\bf u}_t + A {\bf u}_x = 0$ where ${\bf u} = (...
0
votes
0answers
15 views

What are some options for adaptive spline approximation of data in 1-D?

What are available options for adaptive spline approximation of data in 1-D? I've some data in a single dimension that I would like to approximate using some kind of spline, preferably a cubic. As ...
2
votes
1answer
67 views

Numerical schemes for linear advection: stability, dissipation, dispersion

A generalized numerical scheme for the linear hyperbolic equation $u_t + au_x = 0$ has the following form $$ \frac{u_j^{n+1} - u_j^n}{\Delta t} + a\frac{u_{j+1}^{n} - u_{j-1}^n}{2\Delta x} - \chi \...
-3
votes
2answers
27 views

Numerical Analysis , number reprentation in machine

Consider a hypothetical computer using the number representation: base = 2; signed bit exists; 20 bit mantissa, first mantissa bit is always 1 except for representing zero; exponent $e$ ...
0
votes
1answer
31 views

Proving the accuracy for numerical integration

Given a smooth function $f$, we denote $L_{f}$ the Lagrange polynomial of degree less than or equal to $1$ which is equal to $f$ at the points $x_1$ and $x_2$. Define $I_{f} = \int_{-1}^{1} L_{f}(...
0
votes
1answer
32 views

Lagrange interpolation formula

Give the formula of the $1$st degree Lagrange polynomial $L(x)$ interpolating a function $f$ at the points $0$ and $1$. Give the formula for the error $L - f$. Finally, show that $$\sup_{x \in ...
2
votes
1answer
30 views

Burden Numerical Analysis Lagrange Interpolation Question

I have been trying to solve a problem on Lagrange Interpolation from the book Numerical Analysis 10th Edition by Richard Burden. I have been stuck on the first question it for hours and cannot figure ...
0
votes
1answer
35 views

Proving a matrix inequality given another inequality

Suppose that for the $2$-norm, we have $||A||_{2} < 1$. Show that $||I - A^{T}A||_{2} < 1.$ Assume $A$ is invertible. I don't know how to solve this problem. I'm studying for an exam. I know ...
2
votes
0answers
30 views

Lax-Wendroff method for nonlinear hyperbolic systems of conservation laws

In page 127 of R.J. LeVeque's "Numerical Methods for conservation laws" (Birkhäuser, 1992), There are various ways that [the Lax-Wendroff method for constant-coefficient linear hyperbolic systems] ...
3
votes
1answer
74 views

Understanding numerical methods for nonlinear hyperbolic equation

For the linear advection $u_t + au_x = 0$, we have the explicit Lax-Friedrichs scheme $$ u_k^{n+1} = \frac{1}{2} (u_{k+1}^n + u_{k-1}^n) - a\frac{\Delta t }{2 \Delta x } (u_{k+1}^n - u_{k-1}^n) $$ ...
0
votes
1answer
30 views

Efficient numerical solution for $x$ in $\int_0^a \frac{f(t)}{x - f(t)} \, \mathrm{d}t = b$

I'm looking to numerically solve an integral equation in the form $$\int_0^a \frac{f(t)}{x - f(t)} \, \mathrm{d}t = b$$ where $x$ is the unknown constant to be solved, $f(t)$ is a known arbitrary ...
0
votes
0answers
29 views

Bounding the error in a solution, to an IVP, produced by RK4.

What techniques exist for bounding the error in a solution, to an IVP, produced by RK4? The below problem is intended to contextualize the question. Problem The $x$, $y$ and $z$ axes of a coordiante ...
1
vote
1answer
21 views

Modification of the definition of basis function in open clamped B-Spline

An open B-spline is B-spline in which the end knots satisfy $t_0=t_1\cdots=t_d$ and $t_{m-d}=t_{m-d+1}=\cdots=t_m$. A minor modification of the definition of the basis function $$N_{i,0}(t)=\begin{...
1
vote
0answers
21 views

What is the formula for the local truncation error in RK4?

The local truncation error of a one-step ODE solver is defined to be $$e_{i+1} = \lvert y(t_{i+1}) - \tilde{y}_{i+1}\rvert,$$ the absolute value of the difference between the correct solution of the "...
1
vote
1answer
115 views

Lax-Wendroff and Godunov schemes for $u_t + (u^4)_x = 0$

Consider the nonlinear conservation law $$ u_t + (u^4)_x = 0 $$ Write the following schemes for the equation in the form $u_j^{n+1} = F(u_{j-1}^{n},u_{j}^{n},u_{j+1}^{n})$. Im trying to do for ...
0
votes
1answer
63 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, $...
0
votes
0answers
11 views

Crank-Nicolson discretization for nonlinear 1D heat equation

I'm familiar with how to use Crank-Nicolson for linear heat equations, but I'm struggling to setup the discretization of this nonlinear case: $u_t=(k(u)u_x)_x$ for $x\in(0,1)$, $t\in(0,T]$, $u(0,t)=...
1
vote
1answer
56 views

Solve the numerical value of this integral $\int_0^\infty t^{a-1}e^{-t} \Gamma(b,t)dt$

I need to compute the numerical value of this integral, hundred thousand of times, for a typical dataset. How can I get a good approximation. $$ \int_0^\infty t^{a-1}e^{-t} \Gamma(b,t)dt $$ where a ...