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)

3
votes
1answer
159 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
39 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
84 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
47 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
100 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]$. ...
2
votes
1answer
227 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) ...
0
votes
1answer
192 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 ...
2
votes
1answer
135 views

Checking if the Hessian is the derivative of the gradient

Suppose $f: \Bbb R^n \to \Bbb 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. ...
1
vote
1answer
73 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
491 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
152 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
68 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
62 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
75 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?
1
vote
1answer
34 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
133 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
51 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 ...
2
votes
0answers
187 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 ...
18
votes
4answers
410 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. ...
2
votes
2answers
59 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
65 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
207 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
236 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?
5
votes
2answers
2k 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
104 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
33 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
68 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
58 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
96 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
44 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
123 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
37 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
1answer
67 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
65 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$, ...
0
votes
0answers
92 views

Solving system of differential equations

I have a system of differential equation to solve. Any suggestions regarding closed form or numerical method is welcome with great respect. This equation is from dynamic equation of a curve. Let us ...
0
votes
1answer
181 views

Absolute and relative error of a binary number?

Given is the following system $A:={ \pm 1.a_1 a_2 a_3 a_4 \cdot 2^e}$, $a_{i}\in \left \{ 0,1 \right \}$, $i\in \left \{ 1,2,3,4 \right \}$, $e\in \left \{ -8,\ldots,8 \right \}$. Find the absolute ...
1
vote
1answer
112 views

Relative error when computing derivatives via FFT

I want to compute a discrete derivative via the FFT. This amounts to multiplication by the wave number in Fourier space, as detailed in the stack exchange answer here. When I increase the ...
3
votes
2answers
635 views

How to implement a numerically stable solution of a quadratic equation?

Solving $a x^2 + bx +c=0$ for $x$ gives $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$ for $a \ne 0$. But for $a = 0$ we get $x=-\frac{c}{b}$. How to implement a numerically stable algorithm computing ...
0
votes
1answer
53 views

Jacobi Method for the linear systems (for first two iterations)

I have the following 3 linear systems: $$4x_1 + x_2 - x_3 = 5$$ $$-x_1 + 3x_2 + x_3 = -4$$ $$2x_1 + 2x_2 + 5x_3 = 1$$ for x^(0) = 0 Then, I write it as following: $$x_1 = -1/4x_2 + 1/4x_3 + ...
3
votes
1answer
53 views

Newton Rhapson Algorithm Accuracy

I read somewhere that the NR algorithm in general (given an appropriate initial value) increases in accuracy by roughly two decimal places per iteration. Is this something that can be proven, or is ...
3
votes
1answer
110 views

I want to study Numerical linear algebra [closed]

Would you like to recommend a book to me? the proof is explicit and easy to understand is preferred.
0
votes
1answer
118 views

Parity of number of factors up to a bound?

Consider $b,n\in\mathbb{N}$ where $b\leq n$. We want to find the parity (ie. odd or even) of the number of divisors of $n$ that are $\leq b$. The question is to find a fast algorithm to find that ...
3
votes
1answer
124 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 ...
1
vote
1answer
71 views

Computing a solution of the Laplace-Eigenvalueproblem with Neumann-b.c.

Good day! I was considering the Laplace-Eigenvalueproblem with Neumann b.c., i.e. find $u \in H^1(\Omega) \setminus \{0\}$ and $\lambda \in \mathbb{R}$, such that: \begin{eqnarray} -\Delta u \ ...
2
votes
0answers
15 views

Remainder of the minimax approximation polynomial - number of extrema

Recall some definitions. Let $f \in C [a,b]$. The minimax polynomial $p_n$ is the polynomial $p_n (x) $ of degree $\leq n$ that minimizes $||f-p_n||_\infty $. It can be proved that this polynomial ...
0
votes
1answer
16 views

Change of variables from intinite to bounded support.

I may be missing something simple, but I am stuck. My question: I am solving a system of partial differential equations numerically, but one of the variables can take on any value, ie $x \in ...
0
votes
1answer
55 views

Show that Newton method converges for every choice of $x_0$

Let $f\in\mathcal C^{2}(\mathbb R)$ with $f'(x)>0$ and $f''(x)<0$. If $f(x^*)=0$, show that the Newton method converges to $x^*$ for every choice of $x_0$ Wlog, choose a start point $x_0$, ...
2
votes
3answers
187 views

Intuitive Numerical Analysis Texts

Steven Strogatz has a great informal textbook on Nonlinear Dynamics and Chaos. I have found it to be incredibly helpful to get an intuitive sense of what is going on and has been a great supplement ...
1
vote
1answer
89 views

Function Approximation

I need to solve the following equation $$-\frac{\partial S(x,y,t)}{\partial t}=ax^2+bx\frac{\partial S(x,y,t)}{\partial x}+c\Big[\frac{\partial S(x,y,t)}{\partial ...
1
vote
0answers
103 views

Error bound by the Simpson's rule

My lecture notes have a little exercise. Two functions are given: $$ f(x) = \cos(x) \ \text{and} \ g(x)=\sqrt{x+1} $$ And we're asked about the error bound of the Simpson's rule to estimate the ...