Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [numerical-methods]

Questions on numerical analysis/numerical methods; methods for approximately solving various problems that often do not admit exact solutions.

0
votes
1answer
15 views

how to improve numerical stability

I'm trying to improve the numerical stability of $(x+1)(x-1)(x-2)/(x^2+4)$. I already have turned it into $(x+1)(x-1)/(x+2)$ and NaN if $x=2$. I realize that I can't make it better around $x=-2$ due ...
0
votes
0answers
21 views

Could someone explain midpoint method to me?

I have an exercise here, but I would like to familiarise myself with the midpoint differential equation method and solve this exercise, could anyone help me out? How do I go about solving it? ...
0
votes
2answers
25 views

Approximating $\pi$ with arctangent

Use the fact that $\frac{\pi}{4} = \text{arctangent}(\frac{1}{2}) + \text{arctangent}(\frac{1}{3})$ to determine the number of terms summed to ensure an approximation to $\pi$ less than $10^{-3}$. So ...
1
vote
0answers
22 views

Burger's Equation

I have solved Burger's equation using Total Variation Diminishing for initial conditions $\sin(2\pi x)$, and the results are as shown here: Do the results look okay? How would I find the exact ...
-1
votes
0answers
11 views

nonlinear-programing,numerical-optimization,numerical-methods [on hold]

prove that Newtonian direction for functions convex is a decreasing direction?
0
votes
1answer
26 views

Euler's method on IVP, finding the global error.

I have the following system: $y'=y+e^x$ $y(0)=0$ The problem asks for applying Euler's method and then finding an expression for the global error. Finally, supposing that $$\lim_{h->0} \frac{1-(...
0
votes
1answer
17 views

Gauss-Newton local convergence

Is it possible for the Gauss-Newton algorithm to converge to a local minima? How does convergence of Gauss-Newton to the correct minima compare with gradient decent and Levenberg-Marquardt?
0
votes
0answers
21 views

Explain Poisson Matrices

First of all, I have a linear difference equation with Dirichlet boundary conditions. We want to approximate by discretization. The author in the book says that one can transform this equation into a ...
0
votes
0answers
24 views

Numerical integration of long fourth order tensor components containing singularities

I need to evaluate a number of integrals over a unit circle, whereby the integrands are very long fourth order tensor components which are functions of phi but also of other tensor components, i.e. i ...
0
votes
0answers
36 views

What method of finding the square root they use in this screenshot?

I saw somewhere a screenshot from a old(?) Russian cartoon with the following math inside. On a screenshot one can see that a student successfully solves 2 exercises on finding square root and ...
2
votes
0answers
13 views

Scaling behavior Levy flight (distance from the origin v number of steps)

In the question Numerical approximation of Levy Flight the implementation of a Levy-flight random walk with Matlab was discussed. For a classical random walk (Brownian motion), we have that the ...
1
vote
1answer
46 views

Write a C program to find a root of $x^3 - 3*x + 1 = 0$ by fixed point iteration method (including convergence check)

The code works fine. But I want to include the convergence criterion which is as follows: if the equation is written in the form $x=g(x)$, then condition of convergence is: $g'(x)<1$. Note that: ...
0
votes
0answers
25 views

points at which newtons method fail

Consider the system $$ \begin{align*} x-1 &= 0\\ xy-1 &= 0\\ \end{align*}$$ For what starting point will Newton's method fail for solving this system? Explain Try I know for ...
4
votes
3answers
174 views

Iteration for fixed point

Suppose $x_{k+1}= g(x_k)$ is fixed point iteration for some continuously diffrentiable $g(x)$. The theorem im learning says that if $g(r) = r$ and $|g'(r)| < 1$ then the fixed point iteration ...
1
vote
1answer
35 views

Check if the problem is well condtioned

I'm trying to check if the problem of calculating the sum of two numbers a and b is well conditioned, provided that |a| > 2|b|. In my solution i split it into cases: ...
-2
votes
0answers
28 views

maximum of a function of three variables [on hold]

I would like if you can help me to check if the maximum of this function is always less than or equal to zero , even with a numerical calculator $f(x,y,z)=\dfrac{\sqrt{zy}+\sqrt{\frac{1}{x}\sqrt{z(\...
1
vote
1answer
38 views

Using Taylor’s theorem to determine an approximation of the highest possible order

If, where $f$ is a function and $a,b,c$ are constants, $af(-2h)+bf(0) + cf(h)$ is an approximation for $f’(0)$, I have to find the values of $a,b,c$ such that the approximation is of the highest order ...
1
vote
0answers
58 views

Fast computation of the area of a surface using MATLAB

I've written an algorithm in MATLAB which has to be real time (by real time I mean anything less than 1 s is perfect for my purpose and less than 10 s is still acceptably good). My algorithm contains ...
0
votes
0answers
21 views

A one dimensional unsteady Heat Conduction Problem boundary conditions

I have a problem. But I can not find the boundary conditions from the figure. Is the following BC'S true? $T(x,0)=100$ $T(0,t)=T(200,t)=0$
-1
votes
0answers
24 views

Motive of Conjugate Gradient method.

It is known that the solution to the linear system $Ax=b$ where $A$ is symmetric and positive definite is the minimizer of the quadratic function $f(x)= \frac{1}{2} x^T A x - x^T b$ We can solve it ...
0
votes
0answers
14 views

Expensive combinatorial optimization of choice of subset from a large finite space

I have a fairly general question -- what's a good (gradient-free) approach to optimizing an expensive function whose input is a choice of subset from a large finite population? That is, I have a set ...
0
votes
0answers
13 views

Concerning the idea of Trust Region methods

As far as I understood is that the idea of TR methods is that at the current iterate $x_k$ we build a model "usually quadratic", of the objective function $f$ to be optimized, $m_k(s)$ of $f(x_k +s)$ ...
0
votes
1answer
16 views

Help with an inequality, for von Neumann stability analysis.

I am performing a stability analysis of the 1D heat equation: $$ \frac{\partial u}{\partial t} = k\frac{\partial ^{2}u}{\partial x^{2}}, $$ Which I have discretised using a forward euler in time and a ...
2
votes
0answers
15 views

Why is A-stability and L-stability tested on exponentials?

Is there a reason why stability of numerical methods is tested on exponentials functions? Can such concept be generalized for other functions? I mean how does testing stability on functions $f(x) = e^{...
0
votes
1answer
20 views

Explicity vs implicit first order euler to approximate $e^{\alpha x}, \alpha > 0$

Hello for the function $$ y(x) = e^{\alpha x} \Leftrightarrow y' = \alpha y, y(0)=1 $$ I wanted to evaluate the error of the two following iterations $$ \left\{ \begin{array}{l} y_k = y_{k-1} + \...
2
votes
3answers
65 views

efficient algorithm for solving equation $\sum_n a_n/(x - x_n ) = 1$

Here $x_n $ are real and $a_n$ are positive, and we have a finite summation. The picture is very clear. But what numerical algorithm is stable and efficient? Supposed $x_n $ are ordered in the ...
0
votes
0answers
20 views

Advantages and disadvantages of the Golden-section search method

As I understand that the golden-section search is a zero-order line search method so it is a global method so in comparison with Newton's and the secant's method this is an advantage. But it has a ...
2
votes
0answers
40 views

Avoid Catastrophic Cancellation for difference between sines [duplicate]

Is there a way to rewrite $\sin(x)-\sin(y)$ that avoids catastrophic cancellation when $x \rightarrow y$? I've tried to rewrite it using trigonometric identities such as $$\sin(x)-\sin(y)=2*\cos\...
1
vote
0answers
26 views

Prescribed way to compute Julia sets

For computing, at least computationally, the Julia set of the mapping $z_n = z_{n-1}^2 + c$, one only needs to follow that $|z_n|\leq 2$ for all $n$, as in the wiki page. Now, if I have a quadratic ...
0
votes
0answers
32 views

Interpolation on Chebyshev point with octave

I have to solve this numeric problem on octave: (A) Check the correctness of the Lagrange (or Newton) interpolation method on some functions, of which the analytical formula is known, considering ...
0
votes
2answers
69 views

How to numerically solve this ODE: $y''' \left(x\right)=-0.5\cdot y \left(x\right) \cdot y''\left( x \right) -0.05 $

I am trying to numerically solve the following ordinary differential equation that I encountered in one article: $$ y''' \left( x \right) =-0.5\cdot y \left( x \right) \cdot y'' \left( x \right) -0.05 ...
2
votes
1answer
38 views

how to handle a “Stiff” algebraic equation numerically?

I have a question of great practical importance for me, but I would like to ask it on a bit more of a theoretical mode, because I feel I lack the basic knowledge on it. I would also like to mention ...
1
vote
1answer
18 views

Convergence of CG method, number of eigenvalues

I am trying to fix this proof of a lemma that I did't correctly write: If $A\in \mathbb{R}^{n\times n}$ symmetric positive definite with $m$ different Eigenvalues $\lambda_j$, then the Conjugate ...
0
votes
1answer
17 views

Numerically solve Lotka-Volterra equations using Euler-Cromer

I am trying to solve this coupled pair of equations $$ {dx\over dt}=\alpha x - \beta xy,\\ {dy\over dt}=\delta xy - \gamma y $$ using the numerical method Euler-Cromer. It doesn't matter which method,...
0
votes
1answer
32 views

Verify that the function $f(x) = e^{2x} - 2x - 1$ has a zero (root) of multiplicity 2 in 0.

From a previous problem, it is given that the function $f(x) = e^{2x} - 2x - 1$ has a zero of multiplicity two in zero. Using that information, I am trying to resolve the following problem: Using ...
0
votes
1answer
71 views

Obtain an aproximation to $\sqrt{5}$ using other numeric methods

From the original problem: Find an approximation to $\sqrt{5}$ correct to an exactitude of $10^{-10}$ using the bisection algorithm. In which I have a function in Mathematica to do the ...
0
votes
0answers
22 views

Numerical approximation to Beta moment generating function

I have a Beta random variable $X \sim \text{Beta}(\alpha, \beta)$, and I'm interested in $\mathbb{E}[e^{2X}]$. The Beta distribution moment generating function is $$f(t) = {\displaystyle 1+\sum_{k=1}...
0
votes
0answers
13 views

Phase Field Method

What are the best references when starting study phase field methods? What other books should one read before studying it? Thanks in advance!
2
votes
0answers
39 views

Physical Interpretation of adding the first derivative of a function to the original function

Is it allowed to add a multiple of the first derivative of a function to its original peak function (say Gaussian/ exponentially modified Gaussian) to change its shape while maintaining the area ...
-2
votes
1answer
42 views

What polynomial root-finding methods “know” how to find all roots? [closed]

What polynomial root-finding methods "know" how to find all roots? Rather than trial and error initial values and intervals? Are there algos that will for sure find all the roots? Regarding concern ...
0
votes
1answer
28 views

Stability region for two step Nyström method

I have the following two step Nyström method: $u_{k+1}=u_{k-1}+2h\cdot f(u_k)$. I want to know the stability region, so I wrote this as $w_{k+1} = A\cdot w_k$ with $A=\left(\begin{matrix} 2h\lambda &...
2
votes
0answers
25 views

Error in Euler's Method [duplicate]

When solving a differential equation of the form $\dot x(t) = f(x(t))$, where $x(t)$ is a curve in a euclidean space of possibly dimension more than one, using Euler's method, is there a (general) way ...
0
votes
0answers
18 views

Initial guessing to bvp4c MATLAB

I am working on a 4th order non-linear variable coefficient homogeneous ODE bvp. I am having issues getting a solution using bvp4c. This could be one of many things. Not having a solution within the ...
0
votes
1answer
20 views

There is a straight solution for difference equation $f(x+1)=\beta(x)f(x)$ such that $\beta(1)=a$ and $x>1$?

Recently, I stock in find a general or special solution of a difference equation $f(x+1)=\beta(x)f(x)$ such that $\beta(1)=a$ and $x>1$. I do not know much about this group of equations so any ...
0
votes
0answers
17 views

decoupling and integrating second-order SDE with different noise models

I'm considering a second-order Hamiltonian ODE and am trying to understand different approaches for introducing noise (and corresponding numerical integration techniques). Given that the deterministic ...
0
votes
1answer
66 views

Approximation to $\sqrt{5}$ correct to an exactitude of $10^{-10}$ [duplicate]

I am attempting to resolve the following problem: Find an approximation to $\sqrt{5}$ correct to an exactitude of $10^{-10}$ using the bisection algorithm. From what I understand, $\sqrt{5}$ has ...
4
votes
0answers
97 views

Stability criterion for leapfrog in relativistic physics.

I am doing a 2D MD simulations of charge carriers in graphene using the Leapfrog algorithm. I am trying to prove that, in some specific cases (when distance between particles is small), the method is ...
1
vote
1answer
48 views

Numerical solution to a system of equations

Let $n\in\mathbb{N}$ and $u_1,u_2,\ldots ,u_n,t_1,t_2\geq 0$ be constants. I'm interested in finding the numerical solution in relation to $\alpha$ and $\beta$ to the following system of equations $$\...
0
votes
0answers
19 views

Gaussian quadrature and Chebyshev polynomial.

I'am trying derive $k+1$-integration formula for : $\int_{-1}^{1} f(x)\frac{1}{\sqrt{1-x^2}} dx$ exact (formula) for polynomials of degree $2k+1$. I know that I have to use Chebyshev polynomials. But, ...
0
votes
2answers
30 views

Problems involving the second Taylor Polynomial of $e^x\cos x$

I'm working on what seem to be very easy problems, but my answers aren't matching my textbook's. 1) Find the second Taylor polynomial of $f(x) = e^x\cos x$ about $x_0 = 0$. $P_2(x) = 1+x$. (correct) ...