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

learn more… | top users | synonyms (2)

1
vote
1answer
50 views

Quick question that I can't find anywhere online about Runge-Kutta

I'm writing a presentation on modelling fluid flow. We used Runge-Kutta second order to describe the flow as a numerical method. I just want verify that Runge-Kutta fourth order would be of a higher ...
0
votes
1answer
33 views

y''+y=cos(t) what is the smallest possible value of t for which |y(t)|>10?

Not sure if this is correct, but I was able to find a general solution of the form: y= c1cos(t)+c2sin(t)+(1/2)tsin(t) I'm not sure how I would go about finding the smallest possible value to make the ...
0
votes
0answers
20 views

Local Truncation error of Gaussian Quadrature

We have error estimate formula for Gaussian quadrature is: $$ \frac{(b-a)^{2n+1}(n!)^4}{(2n+1)[(2n)!]^3}f^{(2n)}(\xi) \; \; \; a < \xi < b$$ Suppose that we have 10 Gaussian points, so how can ...
0
votes
0answers
18 views

Solving System of Boundary Value problem

The boundary value problem: $$y'' + Q(t)y = f(t)$$ satisfying $$Ay(a) +By(b) = g$$ where A, B and Q are the matrices of order n. After calculation, we can get the form of solution will be $$y(x) = ...
0
votes
1answer
24 views

How to determine if an equation represents a cubic spline?

Given the equation $$ f(x) = \left\{ \begin{array}{lr} 2x^3+x^2+4x+5 & : 0 \le x \le 1\\ (x-1)^3 + 7(x-1)^2 + 12(x-1)+12 & : 1 \le x \le 2 \end{array} \right. ...
3
votes
0answers
62 views

How do I apply this PDE as an image filter?

I'm trying to preprocess a height map image with a helmholtz-type equation as described in this paper. The equation is: $$ddx(h') + ddy(h') + y(h'-h) = 0$$ I solved for h and got: ...
1
vote
0answers
37 views

Error bound for Composite Simpson's Rule for $f\notin C^4$

The Composite Simpson's Rule gives: If $f\in C^4[a,b]$ and $h=(b-a)/n$ ($n$ is even), then the error term will be $$ \frac{b-a}{180}h^4f^{(4)}(\mu)$$ for some $\mu\in (a,b)$. My question is what the ...
0
votes
2answers
22 views

LU factorization less efficient than Gauss elimination if only used for one {b} vector?

Here is my thought process: Gauss elimination requires ~(2n^3)/3 flops for forward elimination and then ~n^2 flops for back substitution. LU factorization requires a forward elimination to obtain the ...
0
votes
1answer
59 views

Trapezoidal Error is lower than Simpson Error, Find some condition? [closed]

I find a problem that have no idea for it. in calculating $ \int^{1}_{0} (x^6-mx^5)dx $ we know Trapezoidal Error is lower than Simpson Error. what is the range of $m$? Solution: $\frac {217}{210} ...
1
vote
1answer
19 views

O(h) operator over uniform grid

For a uniform grid $$x_n = -1 + nh$$ where $h = \frac{2}{N}$ and the integration rule $$I_N(f) = h\sum_{n=0}^{N-1}f(x_n)$$ which corresponds to a left hand Riemann sum or to integrating an ...
2
votes
1answer
48 views

How can I compute $\frac{exp(\lambda v_j)}{\sum_{i=1}^n exp(\lambda v_i)}$ in a stable way?

Given an $n$ vector and $\lambda$ > 1e4 I wish to compute this sum $$\frac{exp(\lambda v_j)}{\sum_{i=1}^n exp(\lambda v_i)}$$ for a fixed $j \in \{1, \dots, n\}$. The sum should be less than one, ...
-3
votes
1answer
36 views

Deriving differentiation rule [closed]

Assuming I know the values of a $C^{\infty}$ function $f(x)$ at $x_0 = -h, x_1 = -\frac{1}{2}h, x_2=\frac{3}{4}h, x_{3}=2h$ where $h$ is a small parameter. I need to derive an $O(h^3)$ ...
0
votes
1answer
28 views

Trapezoidal rule in 2 dimensions

I'm using trying to integrate a function in MATLAB using the trapezoidal rule. I'm struggling to get the limits right and how to set up the steps. The limits for $x$ are $[0,2]$ and the limits for ...
1
vote
1answer
29 views

An obstacle encountered in a proof of the existence of a best approximating polynomial of degree $\leq n$

Let $n \in \{0, 1, 2, \dots\}$, let $a, b \in \mathbb{R}$ be such that $a < b$ and let $f \in \mathcal{C}[a, b]$ be a real function that is continuous on the non-degenerate, compact interval $[a, ...
0
votes
1answer
24 views

Numerically solving a steady state equation (diffusion reaction with monod kinetics)

I have a system that I'm interating in time via finite differences, but one of the equations is to be solved at steady state each iteration: $D\Delta S=\frac{S}{S+a}\rho$ I want to solve it via a ...
3
votes
1answer
31 views

How can I project a matrix on the set of symmetric positive definite matrices with trace 1?

Given a square matrix $A \in \mathbb{R}^{n \times n}$, I need to compute $$ \min_{X \in \Omega} \lVert A - X\rVert^2$$ where $\Omega = \{X \in \mathbb{R}^{n \times n} |\, tr(X) = 1, X \text{ is ...
2
votes
1answer
36 views

When does “successive substitution” not work?

Successive substitution is a technique, we learned, used to find the roots of a polynomial $f(x)=x^2-2$ for example. We must construct some function $g(x)$ so that $g(x)=x$ iff $f(x)=0$, for example ...
1
vote
0answers
34 views

asymptotics of the Fourier transform of Daubechies wavelet

I want to evaluate the series \begin{equation} S(\alpha,\omega)=\sum_{k=-\infty}^{\infty}\frac{|\Psi(2k\pi-\omega)|^2}{|2k\pi-\omega|^\alpha} \end{equation} where $0\le\omega<2\pi$, ...
-1
votes
3answers
54 views

Determine the Taylor expansion for the solution of the differential equation

I'm given the following: $$\begin{cases}\frac{dx}{dt} = t^2x\\ x(0) = 1\end{cases}$$ I'm asked to determine the taylor expansion for the solution to the $t^{10}$ term. $$x(t) = a_0 + a_1 t + a_2 ...
1
vote
1answer
55 views

Matlab code for Jacobian and nonlinear function

Write the nonlinear system $x_1^3-2x^2=2$ $x_1^3-5x_3^2=-7$ $x_2x_3^2=1$ in the form $f(x)=0$. Compute the Jacobian J(x). Create the files sys.m and sys_jac.m that ...
0
votes
2answers
51 views

Trapezoidal and Simpson's rule?

I do not know what this questions is asking for: I know how to solve problems with trapezoidal and Simpson's rule. But I dont know what this question wants. Any help please? Estimate the minimum ...
1
vote
1answer
20 views

Numerical solution 1st order ODE with Euler's method

I'm trying to solve this 1st order ODE numerically by bringing it into an explicit form, but I don't think it is valid because of the dependency on x_n in the final expression. $$ \frac{d y}{d x} + x ...
0
votes
0answers
14 views

Taking a Derivative after a linear transformation

Maybe I'm overthinking this since I know d(L*f)/dx = L * df/dx... Anyway, if you know df(x,y,z,w)/dx of a function f at a (4d) point p, how could you find d(q.z/q.w)/dx if you know that q = Ap (where ...
0
votes
1answer
40 views

How to calculate inverse of Variance Gamma call price formula using Newton-Raphson search

The Variance Gamma call price formula is given by: $$C(0)= \int\gamma(R) e^{-rT} \int f\left(S(0) e^{\theta R+\omega T+\frac12 \sigma^2 R} e^{rT-\frac12 \sigma^2 R+\sqrt{T}\sqrt{R/T} \sigma ...
0
votes
3answers
144 views

Solving equation containing different terms of the form x^x

Is it possible to solve the following equation for $x$ as a function of $y$: $$\sqrt{\frac{x+k}{x}}\,\frac{(x+k)^{x+k}}{x^x}=y$$ in a way that the resulting equation $x=f(y)$ is something I can ...
0
votes
0answers
25 views

Computing integrals in order to find an approximation function

For a project in scientific computing I am trying to find an approximation of an unknown function $f(x)$. Given: data points $(x, f(x))$ A basis with which we can approximate $f(x)$ consists ...
0
votes
0answers
35 views

Numerical Triple integral with three other parameters in R

I am trying to do this triple integral $$\int_{0}^{\infty }\int_{0}^{\infty }\int_{0}^{\infty }(u+w)e^{-\frac{(u+w)^2}{2}}(v+w)e^{-\frac{(v+w)^2}{2}}(u+v)e^{-\frac{(u+v)^2}{2}}e^{-(\mu +\lambda ...
0
votes
0answers
52 views

Runge kutta 4th order computation of force solving 2nd order ode

\begin{equation} \frac{dx}{dt} = v \end{equation} \begin{equation} m .\frac{dv}{dt}= F_{p }(x)+F_{g}(v,x) \end{equation} Conside I am solving the above two equations using runge kutta 4th order ...
1
vote
1answer
41 views

intuition about cubic splines vs quadratic splines (degree 3 vs degree 2).

my intuition about quadratic(degree 2) splines is that by the help of its three variables (in each sub-interval) you can make a piecewise differentiable function on the whole interval. in the process ...
4
votes
1answer
46 views

Laplacian solvers for inversion of large matrices?

I have a large matrix L of size 400,000 $\times $ 400,000 . I'm using this L matrix in the following way. Lin = L$^{-1}$ C = D - B * Lin * B'; B,D are of appropriate sizes. L matrix is ...
7
votes
2answers
268 views

Integral for which numeric methods will always give an incorrect result?

I was thinking about the following function: $$f(x) = \begin{cases}0 & x\;\mathrm{computable}\\1&\mathrm{otherwise}\end{cases}$$ And the following definite integral: $$I = \int_0^1 ...
-2
votes
2answers
54 views

Integral approximation - [closed]

Whole day I can not figure out how can be proved the equality: $$\int_0^1 x^2 dx = \frac{1}{n} \sum_{i=1}^n \left(\frac{2i-1}{2n}\right)^2 + \frac{1}{12n^2}$$ Can someone help me, what should I use ...
1
vote
1answer
42 views

The bubble function

In the finite element method and more precisely the MINI element method in two dimensions, they use a function called the "bubble function" which is related to a triangle K of the space meshing and is ...
1
vote
0answers
38 views

Fast algorithm to invert a large sparse matrix

I am interesting in sparse matrix that defined at here. I am looking for a fast algorithm to invert the matrix (better than Gaussian Elimimation). Could you suggest to me some methods that reduce ...
1
vote
1answer
29 views

How to estimate parameters in trigram?

A popular method of computing trigram in NLP is linear interpolation: The question is how to estimate the three linear interpolation parameters to maximzie the following expression? Any form of ...
0
votes
1answer
42 views

Expressing a function's value using finite differences

Let $f : \mathbb{R} \rightarrow \mathbb{R}$ and let $x = (x_0, x_1, x_2, \dots)$ be a sequence of pairwise distinct real numbers. For every $n \in \{1, 2, \dots\}$ and every ordered $(n+1)$-tuple ...
7
votes
3answers
68 views

Where did the idea of hermite interpolation came from?

I am given the Hermite interpolation formula directly in my text book without ANY explanations about how it was first made (obviously it was somehow constructed for the first time with some sort of ...
0
votes
0answers
21 views

How to make a 9-point two-dimensional stencil for a elliptic operator?

I want use a finite difference schem to discretizate the elliptic operator: $$ \nabla \cdot \left( k(x, y) \nabla p\right), $$ where $k(x, y)$ a positive scalar function and $p$ is the unknow. We can ...
1
vote
1answer
26 views

A proof on forward difference operator

Show that $u_0-u_1+u_2-u_3+...=\frac{1}{2}u_0-\frac{1}{4}\Delta u_0+\frac{1}{8}\Delta^2 u_0-\frac{1}{16}\Delta^3 u_0+...$, where $\Delta$ is the forward difference operator. My attempt: ...
0
votes
0answers
9 views

How to optimize this types of problems?

Given that $min [ t_{f} - t_{0} ]$ such that $x(x'(t_{0}),y'(t_{0}),z'(t_{0}),t_{0}) = 0$ $y(x'(t_{0}),y'(t_{0}),z'(t_{0}),t_{0}) = 0$ $z(x'(t_{0}),y'(t_{0}),z'(t_{0}),t_{0}) = 0$ $x(t_{f}) = ...
1
vote
1answer
18 views

Lipschitz inequality required for Broyden convergence proof

I'm trying to understand the proof of the convergence of the Broyden method through the book Numerical Methods for Unconstrained Optimization and Nonlinear Equations, and at some point the proof ...
0
votes
2answers
32 views

Find the first order system of linear equations

Regard the diff equation: $mϕ′′+aϕ′+(mg/L)ϕ=0$ $ϕ(0)=0.1$ $ϕ′(0)=0$ where $m=0.1,L=1,a=2,$ 1) Rewrite the second order diff equation as a system of first order linear equations. 2) What is the ...
0
votes
1answer
29 views

Absolute stability theoretical and empirical comparison

Regard the diff equation: $m \phi'' +a\phi'+(mg/L)\phi=0$ $\phi(0)=0.1$ $\phi'(0)=0$ where $m=0.1, L=1, a=2,$ 1) Rewrite the second order diff equation as a system of first order linear ...
4
votes
1answer
33 views

How can I compute $\sum_{i=1}^n x_i \log(x_i)$ in a stable manner?

Given a vector in $\mathbb{R}^n$ I have an algorithm to compute $$\sum_{i=1}^n x_i \log(x_i)$$ However for my application the norm of $x$ must be 1, hence for big $n$ the components tend to be too ...
2
votes
1answer
74 views

A trigonometric integral identity from Krylov's “Approximate Calculation of Integrals”

In the theory of Fourier series the following expansion is known $$ \operatorname{sign}\left(\sin\left((n + 1) x\right)\right) = \frac{4}{\pi} \sum_{k = 0}^\infty \frac{\sin\left((2k + 1) (n + 1) ...
0
votes
2answers
18 views

Absolute stability for ODEs

I know the formula for asbolute stability is $$|1+h\lambda|<1$$ but how does it work when $\lambda$ is non-negative? I get a negative step which is wrong. Thanks!
0
votes
0answers
16 views

Help Required in eigenvectors for sparse matrix?

I have a large sparse matrix A(~400000,~400000) . If I randomly remove few rows from the matrix will there be considerable change in the eigenvalues and the eigenvector's compared to eigenvector's of ...
0
votes
1answer
19 views

How to stabilize cyclic tridiagonal matrix algorithm?

I've received a task which is: Solve equation by cyclic tridiagonal matrix algorithm: $$ \frac{\partial{f}}{\partial{t}} = \lambda*\frac{\partial{f}}{\partial{x}}, \\ x\in[0,1]\ t\in[0,1] \\ ...
1
vote
0answers
25 views

Hammersley–Chapman–Robbins bound for Rice distribution

I am trying to evaluate the Hammersley–Chapman–Robbins bound for the variance of an unbiased estimate $\hat{\alpha}$ of $\alpha$ (for a given $\sigma$) for the Rice distribution: $$p(x|\alpha,\sigma) ...
0
votes
1answer
49 views

Cubic splines better than quadratic splines?

I have read in a number of places that cubic splines are of more practical use than quadratic splines in general (there are exceptions of course). Anyone know specifically why they are more ...