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
0answers
18 views

Checking tolerance of Newton-Raphson method to calculate square root

Finding the square root of $c$ is finding the solution to: $$x^2 - c = 0.0$$ We can use Newton's method to successively approximate the solution. My question is how to check whether we are within ...
0
votes
0answers
19 views

solving system of equations involving basic trigonometry

I am trying to solve the following system of equations: $$\frac{kq^2}{d}=mg(L-L\cos(α))+\frac{kq^2}{r}$$ $$\sin(α)=\frac{x}{L}$$ $$r^2=(L-L\cos(α))^2+(x+d)^2$$ $$\frac{kq^2}{r^2} \cos (β) = ...
0
votes
1answer
14 views

Quadrature of $\int_{-2}^2 e^{-x} f(x) dx$ by $\alpha_0f(-1) + \alpha_1f(0) + \alpha_2f(1)$

I am looking for an approximation $$\alpha_0f(-1) + \alpha_1f(0) + \alpha_2f(1)$$ of $$\int_{-2}^2 e^{-x} f(x) dx $$ that is exact for polynomials $f$ of degree 2. My first idea is to solve these ...
0
votes
0answers
16 views

calculating a cubic spline goes wrong

I am trying to solve a old exam and really stuck at the cubic splines. We have the function $f(x) = cos^2(\frac{x}{2})$ and the points $x_0 = \frac{\pi}{2}$, $x_1=0$ and $x_2 = \frac{\pi}{2}$. ...
0
votes
0answers
14 views

Accuracy of a finite-difference method for numerically solve a PDE or BVP

When solving the Poisson Equation $$-u''(x)=f(x)$$ with Dirichlet-Neuman boundary conditions $$u(0)=0, u'(1)=0$$ using a finite difference 2-order centered scheme and a 2-order upwind ...
0
votes
0answers
6 views

estimate an upper bound for the error of an interpolation polynom

The task is to estimate the error of an interpolation polynom $p(x)$ to an function $f(x)$. The sampling points are $x_0 = -1,\ x_1= 0,\ x_2=1,\ x_3=3$ So i already calculated the polynom which does ...
1
vote
1answer
23 views

solving system of equations(nonlinear)

I am trying to solve the following system of equations: $$\frac{kq^2}{d}=mg(L-L\cos(t))+\frac{kq^2}{r}$$ $$\sin(t)=\frac{x}{L}$$ $$r^2=(L-L\cos(t))^2+(x+d)^2$$ The parameters are: $k,L,d,q,m,g$ The ...
2
votes
1answer
411 views

Derive error term by using Taylor series expansions.

Using Taylor series expansions, derive the error term for the formula \begin{equation} f''(x)\approx \frac{1}{h^{2}}\left [ f(x)-2f(x+h)+f(x+2h) \right ]. \end{equation} I've tried it on my own ...
3
votes
2answers
137 views

Approximating an Integral for Numerical Computation

I have a program that involves computing a definite integral many times, and have been struggling to find a way to do so quickly. The integrals I need to solve are of the following form: ...
2
votes
1answer
35 views

QR transformation with Householder transformation

It's a task i do to understand minimizing the error including the QR transformation with the help of Householder transformation. I think i really do something wrong but i dont get it running i hope ...
3
votes
1answer
322 views

Riemann sum error and the integral

It is a well known, that we have the following approximation error: $$ ...
4
votes
1answer
1k views

Numerically stable extraction of Axis-Angle from Unit Quaternion

I am looking to extract an axis-angle representation from a unit quaternion. From the definition, a naive attempt might be: $ q = \begin{bmatrix} cos(\theta/2) \\ \omega_x \sin(\theta/2) \\ \omega_y ...
2
votes
1answer
22 views

How to numerically solve the eigenvalues of the laplacian in a triangular domain with Dirichlet boundary condition?

Consider an arbitrary triangle. Now impose the Dirichlet boundary condition. How to solve the eigenvalues and eigenvectors of the Laplacian $-\nabla^2 = - \frac{\partial^2}{\partial x^2} - ...
0
votes
0answers
16 views

Problem on energy of a Discrete Galerkin Method

I'm reading an article from this website: article question is in page 3,about a wave equation,and use the Galerkin method to discrete the space. (1) page4 why the author use the fraction ...
1
vote
2answers
105 views

Determine the number of solutions of nonlinear system without solving.

$x^2-y^2+2y=0$, $2x+y^2-6=0$ I need to determine the number of solutions without solving it. There is a hint that a graph can help but I am still not sure how to go about this. Thanks
4
votes
1answer
412 views

An optimization problem involving orthogonal matrices

Let $X\in\mathbb{R}^{3\times 3}$ be an orthogonal matrix. Then $\mathrm{vec}X\in\mathbb{R}^9$ is a 9 by 1 vector formed by stacking the columns of the matrix $X$ on top of one another. Given a matrix ...
0
votes
0answers
16 views

How do you obtain the version of Simpson's rule required as well as deduce the composite integration rule? [on hold]

Consider the function $$g(x)=f(a+(x−1)h)$$ and obtain a version of Simpson’s rule applicable to an integral $$\int_{a+h}^{a−h}f(x)dx.$$ Then deduce the composite integration rule ...
0
votes
1answer
241 views

The rank of QR factorization

If A is a $m\times n$ matrix $m\geq n$,A=QR is a reduced QR factorization. If R has k nonzero diagonal entries ($0\leq k<n$). I want to know what is the rank of A.Is it at least k?
1
vote
1answer
38 views

What function to use to get geometric mean in trapezoidal rule?

When deriving a trapezoidal rule an integral of $f(x)$ is switched to integral of new function $g(x)$ approximating the first one $$\int_a^b {f(x)dx}\approx \int_a^b {g(x)dx}$$ where $g(x)$ is a ...
0
votes
1answer
34 views

How do you solve the second part of the question where i am required to derive Simpson’s integration rule?

When $v(x) = A + Bx + Cx(x − 1)$ show that $$\int_0^2v(x)dx= 2A + 2B + \frac23.$$ By choosing A,B and C so that $y = v(x)$ fits a given curve $y = g(x)$ at $x = 0$, $x = 1$ and $x = 2$ derive ...
2
votes
2answers
2k views

Newton's Interpolation Formula: Difference between the forward and the backward formula

I was taught that the forward formula should be used when calculating the value of a point near $x_0$ and the backward one when calculating near $x_n$. However, the interpolation polynomial is unique, ...
2
votes
1answer
30 views

A generalization of GMRES

In oder to solve $Ax=b$, GMRES method finds $x_n$ in the $k$-th Krylov subspace i.e.: $$K_n=span\{b,Ab,...,A^{n-1}\}$$ and we have the condition: minimize $\|r_n\|_2$, which $r_n=b-Ax_n$ Now we ...
0
votes
0answers
17 views

Find the hermite interpolating polynomial

$$\begin{array}{ccc}x&f(x)&f'(x)&f''(x)\\0&1&\frac12&0\\1&2&1&-\end{array}$$ Find the interpolating polynom using divided difference table with the given ...
2
votes
0answers
36 views

How to scale “probabilities” to a given mean?

I have a set of scores $x_i$, $i=1,\ldots,N$ (mimicking probabilities, $0\le x_i\le 1$) and I want to transform them so that the result has a given mean $m$, while remaining in the interval $[0;1]$. ...
0
votes
1answer
29 views

Reference for gradient descent with unit norm constraint

I faced a non-convex optimization problem with unit norm constraint. I can solve the problem using the gradient descent method and the projection of the gradient onto the tangent plane as in @joriki ...
0
votes
0answers
8 views

Changing the order of the elements of the divided difference Polynomial Interpolation

Apparently this is rather trivial but I don't understand why what I've highlighted in green is correct.
2
votes
0answers
14 views

Horn–Schunck method. Explanation of iterative solution

I am reading this paper (explanation of Horn-Shunck method for finding optical flow) and trying to understand it. My stumbling block is obtainig solution of system of linear equations I(x, y, t) ...
1
vote
0answers
18 views

About reduction to Hessenberg matrix

I've read somewhere that Hessenberg decomposition is not unique unless the first column of $Q$ is given. i.e $Q^TAQ=H$ Then I read the algorithm of Arnoldi iteration and I found an amazing fact: ...
0
votes
0answers
22 views

Checking if the Hessian is the derivative of the gradient

Suppose f: R^n --> R. I have a code that computes the gradient of f. I have another code that computes the Hessian of f times a vector. Now I want to check if they are correct. Specifically, I am ...
3
votes
1answer
109 views

Numerical integration of $\sin(p_{m})$ and $\cos(p_{m})$ for a polynomial $p_{m}$

I was wondering if anyone knew about any numerical methods specifically designed for integrating functions of the form $\sin(p_{m})$ and $\cos(p_{m})$ where $p_{m}$ is a polynomial of degree $m$. I ...
2
votes
1answer
63 views

How does one find the area of an implicit function?

For example we have the equation $y^2+\sin({4y\cos{x}})=4$ You can see the graph here at: https://www.desmos.com/calculator/1sxvfl2amd So far I know it is split into top and bottom. I'm trying to ...
1
vote
1answer
36 views

Fixed Point theory question (Numerical methods)

I have an exam in a previous exam paper which i have no solutions too. I am stuck on the last 2 parts of the question and have been for several days now! Any help much appreciated. Here is the ...
3
votes
2answers
80 views

Approximation of $\pi$, with an error of less than $\frac{1}{2}\times 10^{-8} $

This is what I've achieved so far: $$\tan^{-1}1 = \frac{\pi}{4} \Rightarrow \pi = 4\tan^{-1}1$$ $$\tan^{-1}(x) = x - \frac{x^3}{3} + \frac{x^5}{5}+ \cdots + (-1)^k\frac{x^{2k+1}}{2k+1}$$ $$\pi = ...
2
votes
1answer
97 views

Solving equation $a^{-x} + \log x/\log a = 0$

Please can you instruct me how should I start writing an algorithm (pseudo-code, to be implemented) for finding all solutions for the following equation: $a^{-x} + \log x/\log a = 0$ where $a$ ($a$ ...
2
votes
0answers
26 views

Solving systems of equations with trigonometric terms

I am trying to solve (or rather find the least squares solution for) a system of equations with trigonometric terms in them. The system consists of pairs of equations of the form $a_1 \cos\theta - ...
0
votes
0answers
12 views

Numerical solution of first order ODE

I have an in-homogeneous ODE. $R'(x)-(C_1 +C_2 x) R(x) = R_1-C_1 R_0\, x \tag 1$. What I know is the constant matrix $ R(0)$ as initial condition. Question:- how to find out R(1) by numerical ...
2
votes
2answers
57 views

Determinant of an ill conditioned matrix

I have the following ill conditioned matrix. I want to find its determinant. How is it possible to calculate it without much error \begin{equation} \left[\begin{array}{cccccc} ...
0
votes
0answers
27 views

Weierstrass substitution for solving trigonometric eqations

I'm trying to solve a set of equations of a parallel robot . The equations can be writen as $x(\cos(\theta),\sin(\theta))$ $y(\cos(\theta),\sin(\theta))$ so to solve the equation I used Weierstrass ...
2
votes
0answers
38 views

solving singular linear system $Ax=0$

what are computational methods for solving square singular linear system $Ax=0$ for a nonzero $x$ with $A$ of large dimensions?
0
votes
0answers
21 views

finding eigenvector with its eigenvalue known

suppose I have a square matrix $A$ of large dimension(>100) with eigenvalue $\lambda$, what are the numerical methods to find its corresponding eigenvector without using the inverse of A?
0
votes
0answers
15 views

Finite difference method for elliptic pde stability condition

I am trying to implement a finite difference scheme for the elliptic pde $\nabla(a(x_1,x_2)\nabla\phi(x_1,x_2))=0$ where $(x_1,x_2) \in (0,l_1)\times(0,l_2)$ with $l_1 \neq l_2$ necessarily. I know ...
1
vote
1answer
12 views

transformation of matrices for smaller condition number

I have matrices of very large condition numbers. I wonder if there are any techniques to transform the matrices into new matrices with smaller condition number, keeping the eigen properties the same ...
0
votes
0answers
18 views

4th order method

I am asked to solve a ODE using the 4th order Runge-Kutta method, and then given the analytical answer, 'show the method is 4th order numerically' . What does the question 'show the method is 4th ...
3
votes
2answers
327 views

Best numerical method to integrate a differential equation like $\frac{\partial y}{\partial t}=f\left(t,\frac{\partial y}{\partial r}\right)$?

What is the best numerical method to solve an equation like this: $$\frac{\partial y}{\partial t}=f\left(t,\frac{\partial y}{\partial r}\right)\quad?$$ Can somebody give, at least, a reference?
9
votes
1answer
89 views

How could I improve this approximation?

In a computer application, I need to solve trillions of times an equation which can be reduced to $$f(x)=\sin(x)-a x=0$$ Newton methods (quadratic and higher orders) are used for the solution. ...
1
vote
0answers
12 views

Finite Difference Discretization of Darcy's law and solving with Picard method

I am trying to discretize Darcy's Law using finite differences and then solving the resulting linear system of equations with the Picard method. So far only in 1D and the steady-state (no time ...
0
votes
2answers
35 views

Least Squares Solution Confusion

Say if I have an overdetermined system $A\vec x=\vec b$, I can use the normal equations $\implies$ $A^TA\vec x=A^T\vec b$. If I solve for $\vec x$ I will get a "solution" with an error. It says in ...
1
vote
2answers
40 views

Euler's method for first three approximations?

I have tried variations of the problem for an hour at least and cannot get around to sloving this one. Thank you for input!
3
votes
2answers
47 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 ...
0
votes
1answer
26 views

Newton-Cotes Quadrature formula

Im trying to find more information about numerical integration methods. When is a Newton-Cotes Quadrature formula on n nodes exact?