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
4answers
99 views

The equation $x-\sin x = 0$

If we have the equation $x-\sin x=0$, then we can trivially or numerically find the solution to be $x=0$. However, I rearrange the equation algebraically and get $$\frac{\sin x}x=1.$$ If I plug $x=0$ ...
0
votes
2answers
41 views

Firstly what is an $O(h^3)$ formula? Also I am not quite sure how to answer the question?

The forward-difference formula can be expressed as $$f'(x_0)=\frac{1}{h}(f(x_0 +h)- f(x_0))-\frac{h}{2}f''(x_0) - \frac{h^2}{6}f'''(x_0) + O(h^3).$$ Use Richardson's extrapolation to derive an ...
2
votes
0answers
31 views

Compute average and maximum value of a field over a streamline

I'm working on a code solving a set of PDEs. I have a vector field, $\vec{v}(x,\theta,z,t)$ (it's a velocity) and a scalar field, $c(x,\theta,z,t)$. I have a $2\pi$-periodicity in $\theta$. The ...
1
vote
0answers
18 views

efficient least squares A = BX+CXD (solving for matrix X)

I am interested in solving a least-squares solution of the form $$ \operatorname{argmin}_X \| A - BX - CXD \|_F^2 $$ for large (rank in hundreds to thousands) matrices $A,B,C,D,X$ I know this is ...
0
votes
1answer
22 views

Application of Conjugate Gradient Method to non-symmetric matrices

I am currently working on a problem in which I am using the Conjugate Gradient method to solve for the steady state solution of a continuous time Markov chain. I am applying the algorithm found in ...
0
votes
0answers
13 views

Initial value problem test cases

I am working on some materials about numerical solution of initial value problem for ODEs. Are there any state of art test cases used to test properties of methods? I have found one in Wikipedia and ...
41
votes
16answers
9k views

Why do we still do symbolic math?

I just read that most practical problems (algebraic equations, differential equations) do not have a symbolic solution, but only a numerical. Numerical computations, to my understanding, never deal ...
0
votes
0answers
5 views

Get number equation using specific set of values for get given answer

I have do it for AI assignment. Need a logic for finding solution ..Here is the explanation of problem . I have answer ( any number like for example 10 ). And have some set of numbers (like for ...
1
vote
0answers
9 views

Partial integro-differntial equation

Which method is best suited to solve an elliptic partial integro equation? Is finite difference for the derivatives and composite trapezoidal rule for the integral part stable?
0
votes
0answers
17 views

Find Lipschitz constant for the equation

I am still confused about the theorem relating to find the Lipschitz constant. I have the following equation: $$y' = \frac{1+t}{1+y},\quad 1\le t\le2,$$ where $ y(1) = 2$ and $h = 0.5$. If I were to ...
1
vote
0answers
32 views

Approximations for finite n in limit-based definition of the exponential function

The exponential function can be defined via: $$ e^x = \lim_{n \rightarrow \infty} \left( 1 + \frac{x}{n} \right)^{n} = \lim_{n \rightarrow \infty} g(x; n) $$ In my problem, I actually have the right ...
4
votes
2answers
60 views

Rewriting the matrix equation $AX = YB$ as $Y = CX$?

Is it possible in general, if $A,B,C,X,Y$ are square and of the same dimensions? If so, does it generalize to non-square matrices (using a pseudoinverse)? I'm doing some curve fitting in which I have ...
2
votes
1answer
21 views

normal equations of $ y(t) = \gamma e^{\lambda t} $ for minimizing the error

Let $ y(t) = \gamma e^{\lambda t} $ and we have the points $(0,2)\ (1,0.7)\ (3, 0.3)$. The task is to get the parameter so that error is minimal. So we need to get the matrix for the normal ...
1
vote
0answers
44 views

What are the numerical methods for huge polynomial systems? [migrated]

Let a system of $n$ polynomial equations of degree $d$ with $m$ variables. I'm interested in a sparse system with $d = 3$, $n \sim 2000000$, $m \sim 50000$ and integer coefficients. What are the ...
1
vote
0answers
40 views

Which (approximative) methods are there to compute the inverse of a complicated function?

I have a complicated function $f(x)$ for which I want to compute the inverse $f^{-1}$ over a certain range $R(f): a \leq f(x) \leq b$. The only way to find the inverse I can think of is power series ...
0
votes
1answer
45 views

LU factorisation question

I have a question from a past exam with the solution but i am getting a completely different answer to that of the solution. Could someone please tell me where I am going wrong? question: Find the ...
1
vote
0answers
20 views

Integration respect the Lévy measure

How I can compute numerically $$\int_{a}^{b}f(z)\nu(dz)$$ where $\nu$ is a Lévy measure and $f$ is a continuous function? Is it equivalent to $$\int_{a}^{b}f(z)d\nu(z)$$ Thanks
2
votes
1answer
37 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
1answer
57 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
30 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
15 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
31 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
17 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 ...
1
vote
1answer
21 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? [closed]

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
23 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
37 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
53 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
38 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
1answer
29 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
32 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
65 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
82 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
30 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
14 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
29 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
39 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
100 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
13 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
100 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. ...