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
1answer
29 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
31 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
0answers
17 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
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
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 ...
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
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 ...
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 ...
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
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 ...
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 ...
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 ...
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
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.
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
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
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
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 ...
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 ...
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 ...
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
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 ...
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 ...
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$ ...
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 ...
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 ...
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
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!
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 ...
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 ...
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?
0
votes
0answers
13 views

preconditioning techniques for Householder transformation

I am using Householder transformation to get similar matrices for the original symmetric positive definite matrices of large dimensions. However the eigenvalues of the similar matrices are quite ...
3
votes
2answers
48 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 ...
2
votes
1answer
28 views

Cubic spline interpolation realization

dear mathematicians! I was trying to code cubic spline interpolation algorythm. So I found one here. But I was confused. Let's see why. So let say I got 2 vectors - vector $X$ and $Y$ (with ...
0
votes
1answer
14 views

The 'order of error'

If I do a trapezoidal rule estimate and get 0.6386 and the true value of the integral is 0.636294, then the error is 0.002306. If I was asked to find the order of error, does it just mean the error ...
1
vote
1answer
40 views

Why does secant method converge

Assume $f$ is continuous and twice differentiable on $[a,b]$ such that $f'(x)>0$ and $f''(x)>0$, $x \in [a,b]$. If $f(b)>0$ and $f(a)<0$ and I choose $x_0=a$,why are we gauraunteed ...
0
votes
0answers
39 views

Global optimization

Assume that I want to find the global minimum of a non-linear, non-convex, multidimensional function subject to several restrictions. Could you recommend me any deterministic strategy which can ...
1
vote
1answer
28 views

Finite Difference Method Stability with diffusion equation

The diffusion equation is: $ \frac{\partial T}{\partial t} = \alpha \left( \frac{\partial^2 T}{\partial x^2} \right) $ An explicit finite difference approach can be used to solve this, forward in ...
1
vote
1answer
17 views

Looking for a approximation/solution to my mortgage calculator function

I'm working on a little function, $t(A,y,r)$ that calculates the monthly payment of a fixed-rate mortgage, where $A$ is the amount borrowed, $y$ is the number of years over which the loan will be ...
0
votes
1answer
47 views

How obtain a (accurate) function from this graph with these points?

I need obtain the function from 0 to 20 from this graph: I have the even numbers in the {x, f(x)} format: {0, 0}, {2, 1.8}, {4, 2}, {6, 4}, {8,4}, {10,6}, {12,4}, {14,3.6},{16,3.4}, {18,2.8}, ...
1
vote
1answer
30 views

How can we apply the forward Euler method to $x''=x^2$?

If we want to apply the forward Euler method to $x''=x$ with $x(0)=0, x'(0)=1$, we can introduce a new function $$u:=\begin{bmatrix}x'\\x \end{bmatrix}$$ then $$u'=\begin{bmatrix}0&1\\1&0\\ ...
2
votes
0answers
34 views

Stability properties of discretization of ODE

I am trying to find some conditions which guarantee that a continuous time dynamical system and it's discretization have the same behavior with regard to equillibrium points. Specifically that if the ...
1
vote
1answer
29 views

Estimating the absolute error of the function $f(x)=4x^2$

I have to estimate the value of $f(x)=4x^2$ for $x\in [1,2]$, and $x$ is unknown. the approximated value for $x$ is $\tilde x$, which is also in $[1,2]$. What is the maximum absolute error of $x$, ...