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
1answer
265 views

Numerical techniques for solving systems of first-order semi-linear hyperbolic PDEs in two variables

I need to solve such systems of PDEs numerically and I'm wondering what the "standard" method (if there is one) is. The systems I'm interested in have the form: $\frac{\partial F_i}{\partial t} + ...
1
vote
1answer
127 views

How to make recursive computation of $I_n=\int_0^1 \frac{x^n}{x+\alpha}\,dx$ stable?

This is homework, so please only hints. We see that the recurrence $$I_n=\frac{1}{n}-\alpha I_{n-1}$$ can be used to compute the value of the integral $I_n=\int_0^1 \frac{x^n}{x+\alpha}\,dx$ ...
37
votes
16answers
8k 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 ...
2
votes
0answers
20 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
17 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
21 views

Help inverting a non-linear system of equations

I have a set of two equations like this $$ \gamma_3=\left(\frac{1}{\sqrt{1+2c_3^2+6c_4^2}}\right)^3 \left( \alpha_1\,c_3^3 + \alpha_2\,c_3c_4^2 + \alpha_3\,c_3c_4 + \alpha_4\,c_4\right)\\ ...
0
votes
0answers
16 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 ...
1
vote
1answer
387 views

Fitting a sine function to data

I have a sequence of $n$ points $(x_i,y_i)$, for $i=1,\dots,n$. I would like to find the function, of the form $y=V\sin(x+\phi)$, which best fits the points. Which numerical method could I use? I have ...
9
votes
1answer
262 views

Krylov-like method for solving systems of polynomials?

To iteratively solve large linear systems, many current state-of-the-art methods work by finding approximate solutions in successively larger (Krylov) subspaces. Are there similar iterative methods ...
5
votes
1answer
862 views

Using Homotopy to solve system of nonlinear equations

So far I have been using Newton-Raphson (N-R) to solve nonlinear systems. However N-R might run into the problem of singularity depending on the initial guess. I found an alternate approach which is ...
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 ...
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
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
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
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 ...
1
vote
0answers
31 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
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
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 ...
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 ...
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 ...
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 ...
0
votes
1answer
231 views

Bisection method example

I'm writing a small program to resolve functions using bisection method. I want to test the case when the method finds 2 roots, but I can't find examples. Can anyone give me an example of a function ...
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
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}$. ...
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
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 ...
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 ...
2
votes
1answer
412 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
39 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
324 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
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} - ...
1
vote
2answers
107 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
413 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? [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 ...
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
52 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
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 ...
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
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
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
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.
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: ...