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)

2
votes
0answers
14 views

Numerical approximation of differentiation

I have the following task to solve: Let $b>x$ be defined, determine $w_0,w_1$ and $w_2$ in dependency of $b$ such that the approximation $f''(x) \approx w_0 f(x-h) + w_1 f(x) ...
5
votes
3answers
16 views

Numerical integration of a data set with uncertainties

I have a 1D data set {xi, yi} with no uncertainties in xi and with uncertainties dyi in yi. The resulting discrete function is monotonic and relatively smooth and I would like to integrate the ...
0
votes
0answers
26 views

How do I write this equation as a tridiagonal matrix to write the $n+1$ implicit formula?

I am doing a homework problem for my Applied Numerical Methods class, and I've worked the problem up to this point: $$ \large \frac{u_m^{n+1} - u_m^n}{k}=\frac{u_{m+1}^{n+1} - 2u_{m}^{n+1} + ...
3
votes
0answers
16 views

Squarefree products of a class of primes

Numbers which are the sum of two squares are the product of a square and a collection of distinct primes which are 1 or 2 mod 4. Landau proved that there are $\sim kx/\sqrt{\log x}$ such numbers up ...
0
votes
0answers
10 views

Simpson's rule and Hermite interpolant

For a uniform grid, $$x_n = -1 + nh$$ where $h = \frac{2}{N}$, I need to show that Simpson's rule is an $\mathcal{O}(h^5)$ integration rule. So far, I know to let $p(x)$ be the Hermite polynomial from ...
1
vote
1answer
27 views

Need help with a Crank Nicholson Method example problem.

I have an exam coming up and the professor released the sample test containing a Crank Nicolson question. I was out of town for those two lectures, so I missed the information. Even though I have ...
0
votes
1answer
13 views

efficient computation of Cholesky decomposition during tridiagonal matrix inverse

I have a symmetric, block tridiagonal matrix $A$. I am interested in computing the Cholesky decomposition of $A^{-1}$ (that is, I want to compute $R$, where $A^{-1}=RR^T$). I know how to compute the ...
1
vote
0answers
29 views

How should I rewrite this code to not use feval? [migrated]

I recently finished a homework set in my Applied Numerical Methods class and did alright on it. However, my professor made a note to say I shouldn't use the feval() function because it's outdated. ...
0
votes
2answers
33 views

Analyzing derivative of function.

I have some function $g: [a,b] \to [a,b]$. I know that $g \in C^1[a,b]$, so $g'(x)$ exists. I want to know, if $\forall x \in [a,b]: |g'(x)| \lt 1$. How can I find out if this is true or not? P.S. I ...
1
vote
1answer
21 views

Evaluate $-\gamma-W_{-1}\left(-\gamma e^{-\gamma}\right)=\frac{\pi}{4}$ in $\gamma$.

Evaluate $\gamma$ expressed, involving Lambert function, by $$-\gamma-W_{-1}\left(-\gamma e^{-\gamma}\right)=\frac{\pi}{4}$$ where $\gamma<1$. I doubt that it is possible to find a value for ...
0
votes
2answers
30 views

Can the following system be solved symbolically/analytically?

I have the following system of equations with variables $a,m$, and I'm wondering—can this system be solved symbolically/analytically? \begin{align} m &= 100 + \frac{ \left( 200 ...
0
votes
1answer
22 views

Having trouble with discretization and boundry value problems

I have the following homework question: Consider the boundary value problem $y''(x) + 5y'(x) − (2 + x)y(x) = e^x$ on $x ∈ (0, 2)$ with boundary conditions $3y(0) + y'(0) = 5$ and $y'(2) = 7$. ...
0
votes
1answer
29 views

The Gherkin (an egg shaped building) - equation for the curve in order to calculate the surface area of revolution

I am trying to calculate the surface area of revolution for The Gherkin, an egg-shaped building in London, UK. Not sure about how to obtain the equation of the curve but I have the data points that ...
2
votes
1answer
53 views

double root and newton method, a problem on solved exercise? [on hold]

$f(x)$ in $x= \alpha$ has double roots and define in $\alpha$ neighbor. if the sequence $\{x_n\}$ for solving $f(x)=0$ calculated by newton methods the following is correct. ($a$ and $b$ is plasced ...
1
vote
1answer
27 views

Finding a root by bisection method in Excel

Working on a maths assignment and we're trying to use Excel for a bisection method. $$\frac12 e^{x/2}+\frac{1}{2x}-\frac32=0$$ Here is a pic, I can't get the formula to work with the exponent. This ...
0
votes
1answer
19 views

What is the physical meaning of 2 nodes being same while fitting an interpolating polynomial?

When we are trying to find out constants for Newton's interpolating polynomial, we use divided difference method to find the constants. Then we have Hermite-Genocchi formula to find those constants ...
2
votes
0answers
31 views

Asymptotic expansion of root of $\epsilon x \tan(x)=1$

Indicate a range of roots of $\epsilon x \tan(x)=1$ for which it is impossible to get an approximation using expansions. Since $\epsilon$ is small, I think for the equation to hold, we need ...
1
vote
2answers
37 views

A further question on asymptotic expansions of all real roots of xtan(x)=ϵ

I have asked a related question here How to find asymptotic expansions of all real roots of $x \tan(x)=\epsilon?$, however, when I discussed with my adviser today, he argued the solution is flawed. ...
2
votes
1answer
26 views

How do I write the generic finite difference approx of f'(x) using Lagrange interpolating polynomial approximation?

I have the following homework problem: (10 points) Differentiation Formulas by Lagrange Interpolating Polynomials. (a) Write the generic finite difference approximation to f'(x) using the Lagrange ...
2
votes
1answer
58 views

questions on polynomial Lagrange Interpolation of order $n$?

I ran in One Ex in my book when I‌ prepare for final exam on numerical method. how can help me how we solve such a problem? if $P(x)$ and $Q(x)$ be two polynomial Lagrange Interpolation of order $n$ ...
0
votes
1answer
35 views

How to integrate this using tan(x/2) substitution?

How do I integrate cos(x)/(sqrt(5)+cos(x)) ? I have been advised to use t = tan(x/2) substitution but ended up with a polynomial of degree 4 over one of degree 6 to integrate, which did not have an ...
0
votes
2answers
22 views

About minimal curvature of splines

I am given a the following problem set: Let $s$ be a natural cubic spline that interpolates a function $f \in \mathcal{C}^2 ([a,b])$ at points $a = x_0 < x_1 < \ldots < x_n =b$ with ...
1
vote
1answer
40 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
31 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
13 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
12 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
21 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
53 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
30 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
21 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
26 views

Struggling to plot this in maple. Pease Help :) [closed]

I am fairly new to maple and am struggling with plotting the line $$2c+c^2\ln(\dfrac{1-c}{1+c}) $$ with a system of points. I know We use plot(f(x)) to plot a function, and pointoplot([a,b]) to plot ...
0
votes
1answer
57 views

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

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
votes
0answers
31 views

Why use the Runge-Kutta method to solve differential equations? [closed]

Why does one use the Runge-Kutta method to solve differential equations, calculating previous and future positions? Why not use, for example, normal equations, derivatives, or something else?
1
vote
1answer
17 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_{i=0}^{N-1}f(x_n)$$ which corresponds to a left hand Riemann sum or to integrating an ...
2
votes
1answer
42 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
25 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. How would I derive an $O(h^3)$ ...
0
votes
1answer
19 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
28 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
13 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
26 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
30 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
50 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
32 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
44 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
19 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
13 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
34 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
139 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
22 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 ...