Hot answers tagged

4

Like any field of mathematics, Numerical Analysis certainly does have theorems, and Gödel's results apply to them. If you insist on restricting your attention to applications involving computations on a specific machine with a finite amount of memory, then there is no scope for incompleteness: there are only finitely many programs that fit in the memory, ...


3

You can combine bisection and Newton method very efficiently. If you go to this place, on page 359, you will find subroutine RTSAFE (here and here) which does exactly what you want. It is very robust. I apologize for giving you a reference to Fortran coding. If you can access the books of Numerical Recipes, you will find the equivalent in C and C++.


3

Regarding "easy to implement", I would recommend that you use a root-finding function written by an expert, rather than writing your own. That's certainly easier, and will probably lead to better results. The algorithms in the "Numerical Recipes" books are typically pretty good, though they favor simplicity over optimality. If you really want to write your ...


3

The error with exact evaluation is bounded by the next term. So the partial sum up to $k=N-1$ has an error of about $$ \frac{(20)^{2N+1}}{N!(2N+1)}\sim\frac{20}{2N+1}\left(\frac{400·e}{N}\right)^N $$ As one can see, it takes about $N=400$ to start seeing decreasing terms and about $N=1200$ to get small remainder terms. The maximum term at $N=400$ has size ...


2

First, why this expression for $c$? If I recall correctly then $$ c=\sqrt{\frac{E}{\rho}}\,. $$ Second, the eigenvalues you found are the eigenvalues of the operator $$ -\frac{d^2}{dx^2}, $$ and the eigenvalues are $\omega_n^2$, it is easier to deal with squares, hence to relate everything you need to find the eigenvalues of $-A$ (you use $A$ in two ...


2

I want to expand upon Brevan Ellefsen's comment and my comments a little. I assume that dots in OP's case mean $x$ derivative, since $y(x)$ depends only on $x$. Then we can easily get rid of $\alpha$ and $\beta$. $$ \frac{d^2 y}{dx^2}+\alpha \left(\frac{d y}{dx} \right)^2+\beta y=0 $$ Replacing: $$ x \rightarrow \frac{x}{\sqrt{ \beta }}~~~~~y \rightarrow ...


2

Mathematics is indeed moving forward - the more we understand the more new questions suggest themselves. Some of those questions touch on practical applications, some are purely theoretical (for now, at least). But only a small part of what's new is connected to formal logic. We don't need more axioms to prove more theorems, we need to understand the ...


1

y = 0 is the solution of the equation with $y(0) = 0$. You get exact solution for this.


1

There is a fundamental problem associated with computing any inner product \begin{equation} s = x^T y. \end{equation} Specifically, if the result is nearly zero, then the relative error can be arbitrarily large. If $x, y \in \mathbb{R}^n$ are vectors of floating point numbers, then the "standard" algorithm returns $\hat{s}$ such that \begin{equation} ...


1

Note, $$\int_{a}^{\infty} f(x)dx = \int_{0}^{\infty}f(x)dx - \int_{0}^{a}f(x)dx$$


1

I have made a Matlab implementation of your system (script below) to get approximate solutions. a) If $h(1)=0$ (your hypothesis), function $h$ is found by the solver to be identically zero. This is one of the singular solution you are looking for... even it is rather trivial, isn't it ? Fonctions $\phi$ have are decreasing steadily, in a smooth manner. I ...


1

This is a svd decomposition, and it's not unique, because two singular values are equal. That means that U and V are not unique, and probably not in the most symmetric form. The same degeneracy may be present in the solution itself, although the absolute value in the condition on component may then push this into an awkward angle. The fact that the same ...


1

You can tweak $U$ and $V$ so that $A$ becomes $\left[\begin{array}{ccc}a&a&a\\a&a&b\\a&b&c\end{array}\right]$. $(a=0.9595767,b=-0.4841173,c=0.0808466)$ Then $A^TA=A^2$ has eigenvalues $1,1,4$, so $A$ has eigenvalues $\pm1,\pm1,\pm2$ The choice $1,-1,2$ gives $2a+c=2,a(a-b)^2=2$ and I think: $2ac-b^2-a^2=-1$. I think it turns into a ...


1

The convex hull is the smallest convex body that contains the given set. Any other convex body that contains the set will necessarily contain its convex hull. A convex body enclosed in another has both smaller area and smaller perimeter in 2D, or smaller surface area and smaller volume in 3D. So the convex hull is also the smallest enclosing convex body in ...


1

The usual power series fits a function at a point (often zero) and gets worse the further you get from that point. To get an approximation that is good over a whole interval, look at Chebychev approximations or least squares fitting.


1

All numerical methods for approximating the solution of differential equations address the infinite dimensionality of function spaces in which an exact solution is postulated by constructing a finite dimensional analog which can provide a suitable approximation. This is true of finite difference methods as well as finite element methods. Galerkin methods ...


1

The middle between Newton's method and Bisection is the regula falsi or false position method. See wikipedia for details and anti-stalling methods that make this method only slightly slower as the secant method while retaining the convergence guarantees of a bracketed method. from math import abs def illinois(f,a,b, tol): '''regula falsi resp. false ...


1

One of the basic properties of Newton's method is local convergence: if a function is continuously differentiable on a neighborhood of its root, then for any $x_0$ in a (generally smaller) neighborhood of the root, Newton's method converges. Examples like this one show us that it can have very erratic behavior otherwise. This is basically because linear ...


1

$P( r ) = 0$ and $Q( r ) = 0$ are the solutions of the given equation for the initial values $P(0) = 0$ and $Q(0) = 0$. The problem is that the rate function is unbound for any solution starting anywhere but from zero (because of $1/r$ and $1/r^2$ terms). So, one cannot even invoke Cauchy theorem here, which means the problem is not well poised.


1

There are many, many different ways to do matrix vector multiplication or the more general matrix matrix multiplication. Mathematically, they return the same result, but their run times differs significantly depending on the size and type of the relevant matrices as well as details of the underlying architeture. The goal is acheive an implementation which ...


1

The energy should oscillate, but not grow. There is a -- for Euler O(h) -- modified energy function that should be constant. Indeed, $$ H(p,q)=p^2+q^2+Δt·pq $$ is constant for the symplectic Euler integration, test with q0 = 1.2 p0 = 0 E0 = p0**2+q0**2 T = 6.2 N = 20 dt = T/N q = q0 p = p0 t=0 for k in range(N+1): q = q + p*dt p = p - q*dt t ...


1

Almost. Your argument works for $|a|<1$, but if $a=\pm 1$ we don't have $\lim_{n\to\infty} a^n=0$. Because $p>0$, however, $\lim_{n\to\infty} 1/n^p=0$. That's because $\lim_{n\to\infty} n^p=\infty$ ($p$ fixed of course). That gives us $\lim_{n\to\infty} |a^n/n^p|=0$ when $a=\pm 1$, and $\lim_{n\to\infty} a^n/n^p=0$ follows. Not sure what your ...



Only top voted, non community-wiki answers of a minimum length are eligible