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
7 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 solution $y(x) =...
0
votes
0answers
12 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
13 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
19 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
39 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-...
0
votes
0answers
10 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
10 views

Stability of scheme implies the following inequality

Suppose we have a scheme for some PDE. To make thins concrete, let us take the model problem $u_t + a u_x = 0$ and the implicit scheme $$ -\frac{r}{2} u_{k+1}^{n+1} + u_k^{n+1} + \frac{r}{2} u_{k-1}^{...
0
votes
0answers
20 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
33 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)$ ...
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
25 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 ...
-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
12 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 = (...
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 ...
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\...
2
votes
0answers
25 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
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
0answers
14 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 ...
0
votes
0answers
43 views

Linear Advection equation in 2D

Can someone explain to me how this can be done? I know one can derive Lax-Wendroff schemes for the linear advection in 2D, but Im would like to know if someone can explain how a corner-transport ...
0
votes
1answer
30 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
57 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 \...
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
34 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 ...
-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
29 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
0answers
20 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
20 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{...
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] ...
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 ...
1
vote
1answer
50 views

How to solve a differential equation graphically?

I want to solve the differential equation $y'(t)=ty(t)+1$, $y(0)=1$ graphically in the interval $[0,1]$. edit: Graphically means here, how to draw it with pen and paper. But how do I do this, ...
0
votes
1answer
17 views

Numerical integration of a function with several parameters

I would like to thank in advance anyone willing to take a look at my question. I am asking whether there exists a method which can be used to numerically evaluate an integral of a function containing ...
3
votes
1answer
73 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) $$ ...
1
vote
0answers
23 views

Treatment of Floating Point Rounding in Trefethen & Bau

Something I noticed in the Trefethen & Bau Numerical Linear Algebra book is that, after introducing elementary floating point arithmetic, they do not pay too much care to the initial rounding of ...
2
votes
1answer
76 views

Understanding Finite element method

Suppose we have Poisson in 1D: $u'' = f(t)$ where $0<t<1$ and $u(0)=0$ and $u(1)=1$ We approximate the solution by $U(t) \approx \sum_{i=1}^n x_i \phi_i(t) $ where $\phi_i(t)$ are some basis ...
1
vote
0answers
30 views

How to show this Sobolev inequality?

I am currently studying numerical analysis and stumbled upon the following task: Prove that for any $q \in [2, +\infty)$, there exists $C \gt 0$ such that $\Vert f\Vert_{L^{q}(\mathbb{R}^2)} \le C\...
1
vote
3answers
69 views

How many Taylor series terms are needed to accurately approximate $\sqrt{a+x}-\sqrt{a}$?

Naive evaluation of $\sqrt{a + x} - \sqrt{a}$ when $|a| >> |x|$ suffers from catastrophic cancellation and loss of significance. WolframAlpha gives the Taylor series for $\sqrt{a+x}-\sqrt{a}$ ...
0
votes
2answers
36 views

Accuracy and stability of an ode method

Attempt I perhaps want to expand in taylor series about $x_n$. $$ y_{n+1} = y_n + h y'_n + h^2/2 y''_n $$ $$ y_{n-1} = y_n - h y'_n + h^2/2 y''_n $$ $$ f(y_{n+1} ) = y'_{n+1} = y'_n + h y_n'' + ......
0
votes
0answers
9 views

Numerical solution of a locally Lipschitz differential equation. (Gross-Pitaevskii)

A (very simplified) version of the GP-equation, can be written as $\frac{d\alpha}{dt}=-Ui\alpha^*\alpha^2=-Ui|\alpha|^2\alpha$, Where $i$ is the imaginary unit. In contrast to what I first thought, ...
2
votes
0answers
29 views

Determining order of accuracy of a method

Consider IVP $y'(x) = - \lambda y(x)$ and $y(0) = 1 $ , $\lambda > 0$ and the numerical method $$ y_n = y_{n-2} + \frac{1}{3} h [ f(x_n,y_n) + 4 f(x_{n-1},y_{n-1}) + f(x_{n-2},y_{n-2}) ]$$ ...
1
vote
1answer
35 views

Given points , derive an approximation for the integral

Suppose we are given points $(x_i, f(x_i))$ and $(x_i, f'(x_i)$) for $i=1,2$. Use Newton Divided differences to design a cubic polynomial $P(x)$ so that $$ \int\limits_{x_1}^{x_2} P(x) dx = (...
3
votes
0answers
34 views

Reference: Good introduction to integro-differential equations

Does anyone know of a good introduction to integro-differential equations, including their theory, solution, and numerical solutions. I have looked through my books on ODEs, dynamical systems, and ...
0
votes
0answers
49 views

How to use Python to calculate the limit of a matrix exponent? [closed]

How would I go about writing a Python script to find the limit of a matrix to an exponent given M is a square matrix? $$\lim_{ n\to \infty } M^n$$ Any advice or resources would be greatly ...
0
votes
0answers
19 views

Gaussian Elimination Roundoff Error Confusion

I have a couple questions about Gaussian Elimination Regular Gaussian Elimination (No pivoting, No making pivots 1, No Row Swapping) Gaussian Elimination with pivoting (Which just means row ...
0
votes
1answer
39 views

I do not know where the formula comes from?

The following formula used in numerical integration but I do not understand where it comes from. Can somebody give me any hint? $$\int_{-\pi}^{\pi}f(x)\sin x dx=(1-\frac{8}{\pi^2})[f(\pi)-f(-\pi)]+\...