New answers tagged

2 votes

How do you *accurately* calculate distances in the hyperboloid model of hyperbolic geometry?

The biggest source of precision loss is how the value inside of $\operatorname{arcosh}$ goes to 1. We'll use the definition of $\operatorname{arcosh}(x) = \log(x + \sqrt{x^2-1})$. Making the ...
D0SBoots's user avatar
  • 445
1 vote

The smallest distance between the curves

Hint : Transform the first equation under a polar form : $$r^4-r^2(\cos^2 \theta-\sin^2 \theta)=0 \ \iff \ r= \sigma\cos(2\theta)$$ Or under an equivalent parametric form : $$\begin{cases}x&=&...
Jean Marie's user avatar
1 vote
Accepted

While solving Wave equation using FDM, how to solve and related eigenvalues

Let $D\in\mathbb{R}^{n\times n}$ have purely imaginary eigenvalues $\{\lambda_1,\dots, \lambda_n\}$ and corresponding orthonormal eigenvectors $\{v_1,\dots,v_n\}$. Now consider $A = \begin{pmatrix} 0 &...
whpowell96's user avatar
  • 5,595
1 vote

I am trying to solve a two point Boundary Value Problem using linear shooting method

Yes, so far this is correct. Now use that the equation is linear, thus the solutions superpose, thus the value at the end of the interval is a linear function of the state at the start of the interval....
Lutz Lehmann's user avatar
0 votes

Machine limit analysis of $\sqrt {x^2-a^2}-(x-a)$

May I add the standard binomial expansion $$ \sqrt{x^2-a^2}-(x-a) =a+[\sqrt{x^2-a^2}-x]\frac{\sqrt{x^2-a^2}+x}{\sqrt{x^2-a^2}+x}\\ =a+\frac{-a^2}{\sqrt{x^2-a^2}+x}\\\approx a-\frac{a^2}{2x} $$ So the ...
Lutz Lehmann's user avatar
0 votes

Machine limit analysis of $\sqrt {x^2-a^2}-(x-a)$

If you want to properly compute $L(x)$, multiply by the conjugate and use Taylor to get $$L(x)=a-a\sum_{n=0}^\infty \frac{\alpha_n} {\beta_n} \left(\frac{a}{x}\right)^{2 n+1}$$ where the ${\alpha_n}$ ...
Claude Leibovici's user avatar
2 votes

Evaluating (or tightly bounding) $\sum_{j=1}^\infty\frac1{x_j(1+a)^2-a}$, where $x_j$ is the $j$-th positive root of $a\tan\sqrt x=(1+a)\sqrt x$

Just for the roots ! Let $x=t^2$ and $k=\frac{1+\alpha}\alpha$ and to remove the discontinuities, search to the zero's of function $$f(t)=k ~t \cos (t)-\sin (t)$$ Expanding around $t= \left(n+\frac{1}...
Claude Leibovici's user avatar
2 votes

Evaluate $\pi$ using $\arctan(\frac{\sqrt{3}}{3})$

Just a bit late ! Using the incompleta beta function $$R_{2n} = (-1)^{n}\int^{\frac{\sqrt3}3}_0 \frac{t^{2n}}{1+t^2}\,dt=-\frac{i}{2}\,(-1)^{-n}\, B_{-\frac{1}{3}}\left(n+\frac{1}{2},0\right)$$ $$\log(...
Claude Leibovici's user avatar
0 votes
Accepted

Analytically Solving an Equation System of the type $kn x^{n - 1} + x^n$ for $k$ and $n$

Maple 13's solve command yields: $$k=-\frac{r}{y}(uz-vy)x^\frac{ux}{r(uz-vy)},\ \ n=-\frac{ux}{r(uz-vy)}.$$ Maple 13's eliminate command yields: $$n=\frac{1}{\ln(x)}W\left(\frac{ux\ln(x)}{ky}\right),\ ...
IV_'s user avatar
  • 7,022
2 votes
Accepted

Detailed exp does Euler's method fail for second order sinusoidal ODE?

You can try some symbolic iterations. The state vector $$Y=\begin{pmatrix}y\\ v \end{pmatrix}$$ has derivative $$f(x,Y) = \begin{pmatrix}v\\ \sin x \end{pmatrix}$$ and I.C. $$Y_0 = \begin{pmatrix}0\\ -...
John Alexiou's user avatar
  • 13.9k
0 votes
Accepted

Lagrange interpolation and orthogonal polynomials

Since $L_i$ is a polynomial of degree $n-1$, $L_i^2$ is of degree $2n-2$, thus we can reuse (I), $$\int_a^b L_i^2(x)dx = \sum \lambda_j L_i^2(x_j) = \lambda_i.$$ And by (I), $\lambda_i = \int_a^b L_i(...
Yimin's user avatar
  • 3,326
1 vote

Implementing Boundary Conditions at Infinity in Numerical Method

The way to approach this numerically is to implement a perfectly matched layer boundary condition. When you are doing a graphical analysis of your numerical solution, you can only do it in a finite ...
FriendlyNeighborhoodEngineer's user avatar
-1 votes

Can the order of convergence be defined for a bisection method?

Bisection is a simple and wasteful method. All the better methods use the available data about function values and build a model from them. The root of the model is then taken as the new midpoint. The ...
Lutz Lehmann's user avatar
0 votes

Approximating the integral of the exponential of a quadratic function

Completing the square leads to the imaginary error fuction $$I=\int e^{ax^2+bx+c}\,dx=\frac{1}{2} \sqrt{\frac{\pi}{a}}\,\,e^{c-\frac{b^2}{4 a}}\,\,\text{erfi}\left(\frac{2 a x+b}{2 \sqrt{a}}\right)$$ ...
Claude Leibovici's user avatar
0 votes

Initial approximation to inverse of beta distribution function / quantile of beta distribution

I suppose that the second approximation assumes that $x$ is small. By Taylor $$\frac{B_x(p,q)}{B(p,q)}=x^p \left(\frac{1}{p B(p,q)}+\frac{(1-q) x}{(p+1) B(p,q)}+O\left(x^2\right)\right)$$ Using the ...
Claude Leibovici's user avatar
0 votes

What should the initial guess be for the Babylonian method of calculating square roots?

If you are using a computer, the number will be stored in binary and from this storage you can render the number as $a×4^n$ with $1\le a<4$ and $n$ an integer. Since the method will converge from ...
Oscar Lanzi's user avatar
  • 39.5k
0 votes

asymptotic expansion of exponential solution to ODE

If you let $u=z \sqrt x$, the equation becomes $$x^2 z''+x z'+\left(x^2-\frac{4\gamma+1}4\right)z=0$$ which is a Bessel equation. Let $k=\frac{1}{2} \sqrt{4 \gamma+1}$ to obtain $$z=c_1 \,J_k(x)+c_2\,...
Claude Leibovici's user avatar
0 votes

Uniqueness of Hessenberg matrix in Cholesky factorization of Hankel matrix

This is not $\textit{very}$ evident, but it does come down to a cool property of powers of Hessenberg matrices and induction: Suppose we have a "Hessenberg upper triangular-like matrix" $M$ ...
Toby Saunders-A'Court's user avatar
0 votes

Asymptotic expansion of root of $\varepsilon x \tan(x)=1$

I do not see any problem if you look for the zero's of $$f(x)=x\sin(x)-k \cos(x) \qquad \text{where}\qquad k=\frac 1 \epsilon$$ Expnd it as a series around $(2n+1)\frac \pi 2$ and use power series ...
Claude Leibovici's user avatar
2 votes
Accepted

Uniqueness of Hessenberg matrix in Cholesky factorization of Hankel matrix

I would assume the upper Hessenberg matrix here is unreduced, i.e. the subdiagonal entries are all nonzero. The first column of $T$ is of course $Te_1$, and so is determined by (2.4). If $T$ is ...
dummy's user avatar
  • 500
1 vote
Accepted

Best root finding algorithm to use for this problem..

I got all nerd-style with your question... Preamble: I hope my math is OK. Starting with the approach suggested by @Paul Sinclair, if we define $Z = \sigma \sqrt{T} $ (since both $\sigma$ and $T$ are ...
Infinity77's user avatar
1 vote

Inscribing a square bar in a box

I've implemented the method outlined in the question, and used the Newton-Raphson multivariate method to arrive at a the solution. The cuboid example I had dimensions $20 \times 30 \times 30 $ and $d =...
Hosam Hajeer's user avatar
  • 22.3k
0 votes

Solution of $a^x=\Gamma(x)$ for $a \geq 1$

For sufficiently large $n$, $a^{n!} >> a^{n^2}=(a^{n})^n>>(a!)^n$ so there's no need to solve such a difficult problem If you curious though, try to solve the log version $$x\log(a) =\log(\...
ioveri's user avatar
  • 1,451
2 votes

closed-form solution for 1/tanh(x) - 1/x that can be evaluated at/near x=0?

If you accept an infinite series as a closed form solution, there is one. $$y=\frac{1}{\tanh (x)}-\frac{1}{x}=\sum_{n=0}^\infty \frac{2^{2 n+2}\, B_{2 n+2}}{(2 n+2)!}x^{2n+1}\tag 1$$ use use power ...
Claude Leibovici's user avatar
2 votes

Solution of $a^x=\Gamma(x)$ for $a \geq 1$

There is a good approximation (have a look here). $$x_0 \sim a \,e^{1+W(t)}+\frac 12 \qquad \text{with}\qquad t=\frac{\log \left(\frac{a}{2 \pi }\right)}{2 e a}$$ $W(.)$ being Lambert function. For $...
Claude Leibovici's user avatar
2 votes
Accepted

What is the importance of the largest eigenvalue / spectral radius of a symmetric positive matrix being equal to 1? Particularly in attention.

First of all, $\rho(\mathbf{A}) < 1$ doesn't mean $\lVert \mathbf{Ax} \rVert < \lVert \mathbf{x}\rVert$, an example is $\mathbf{A} = \left(\begin{matrix}0 & r^{-1}\\ r &0\end{matrix}\...
ioveri's user avatar
  • 1,451
0 votes
Accepted

Is this method I made, (Babylonian Approximix) to find square roots with an approximate answer accurate and useful?

My answer is similar to Ethan. If $a<<x$, then $$\frac{(x+a)^2}{x}=x+2a+\frac{a^2}{x}≈x+2a$$ Now my own contributions. I have tried to replicate your process as a singular function, then you're ...
Gwen's user avatar
  • 1,083
0 votes

Is this method I made, (Babylonian Approximix) to find square roots with an approximate answer accurate and useful?

It's clever. It works because $$ (x+a)^2 = x^2 + 2ax + a^2 $$ so $$ \frac{(x+a)^2}{x} = x + 2a + \frac{a^2}{x} \approx x + 2a $$ when $x$ is large compared to $a^2$. Whether or not it's useful ...
Ethan Bolker's user avatar
  • 95.4k
2 votes

How to evaluate $\sum\limits_{n=3}^ \infty \frac{1}{n \ln(n)(\ln(\ln(n)))^2}$

Known acceleration approaches are Euler–Maclaurin and Abel–Plana. Let's take the second one: $$ \sum_{n=a}^\infty f(n)=\frac12f(a)+\int_a^\infty f(t)\,dt+i\int_0^\infty\frac{f(a+it)-f(a-it)}{e^{2\pi t}...
metamorphy's user avatar
  • 39.2k
0 votes

How to transform this expression to a numerically stable form?

It is sure that, if you access the described function, @njuffa provided he perfect answer. If this is not the case, using Taylor series $$f(x, t)=\frac{\left(1+x\right)^{1-t}-1}{1-t}=\sum_{n=0}^\infty ...
Claude Leibovici's user avatar
0 votes

Numerical approach of integral equation

I assume you are taking a non-trivial solution ($s(t) \neq D$). Let I be the integral, by Leibniz's rule we have $$\frac{\partial I}{\partial s} = -\int_0^t f(s,\tau)d\tau$$ $$\frac{\partial^2 I}{\...
ioveri's user avatar
  • 1,451
0 votes

Solving $n \ge \frac{K_n^2}{\epsilon^2} \frac{\log K_n}{\epsilon}$, where $K_n = (\log n)^3$

The problem is simpler if you let $n=e^x$ and then you search for $x$ such that $$ f(x)=e^{-x} x^6 \log (x)-\frac {\epsilon^3}3 >0$$ The derivative is $$f'(x)=e^{-x} x^5 (1-(x-6) \log (x))$$ ...
Claude Leibovici's user avatar
2 votes

How to evaluate $\sum\limits_{n=3}^ \infty \frac{1}{n \ln(n)(\ln(\ln(n)))^2}$

In general we can approximate a sum $S=\sum_{i=m}^n f(i)$ by an integral $I=\int_m^n f(x)dx$, more precisely for $n=\lfloor x\rfloor$ and $f(x)=1/(x\log(x)(\log\log(x))^2)$ we have $f(n)\geq f(x)\geq ...
Derivative's user avatar
  • 1,566
1 vote

How to evaluate $\sum\limits_{n=3}^ \infty \frac{1}{n \ln(n)(\ln(\ln(n)))^2}$

Not a complete answer, but maybe it helps.. Here, have some derivatives: $$\frac{d}{dx}\log x = \frac{1}{x}$$ $$\frac{d}{dx}\log\log x = \frac{1}{x\log x}$$ $$\frac{d}{dx}\frac{1}{\log\log x} = \frac{-...
kid's user avatar
  • 103
0 votes

How to evaluate $\sum\limits_{n=3}^ \infty \frac{1}{n \ln(n)(\ln(\ln(n)))^2}$

Using Python script: ...
Piotr Wasilewicz's user avatar
1 vote

Determining algebraically a point of intersection.

I think that it could be better to write the equation as $$e^x\,\log(x)=1$$ By inspection, the solution is $\in (1,2)$. Expand the lhs as $$f=e^x\,\log(x)=e \sum_{n=1}^\infty a_n\,(x-1)^n$$ where the ...
Claude Leibovici's user avatar
0 votes

Gauss-Hermite quadrature of entire function

See Theorem 3.3 https://www.sciencedirect.com/science/article/pii/S0022247X12002600?via%3Dihub#s000015 and also a recent preprint https://arxiv.org/abs/2312.07940.
kisten's user avatar
  • 314
3 votes
Accepted

Approximation of $\int_0^{\infty} e^{-bx^2}sin(ax^2)dx$ when a>>b

If you use Euler representation of the sine function, the antiderivative is an error function since $$\int e^{-bx^2}\,\sin(ax^2)\,dx=\Im \left( \int e^{ (b-i a)x^2}\,dx\right)$$ Edit As @Travis Willse ...
Claude Leibovici's user avatar
0 votes

Convergence problems with numerical integration

Are you trying to integrate over a semi-infinite interval, i.e. you want $\int_0^\infty f(x) dx$? Just making the interval really large (e.g. you mention $10^{10}$) is a probably bad idea, because ...
SGJ's user avatar
  • 367
0 votes

Is the notion "If a polynomial has small coefficients (relative to the exponent), then it has small roots" true?

A bit late to the party, but I always find it insightful to look at the easiest or most know answers. In this case look at the standard roots for the quadratic equation $ax^2+bx+c$: $$ x = \frac{-b\pm ...
User123456789's user avatar
9 votes

What is meant when mathematicians or engineers say we cannot solve nonlinear systems?

I think what you see there is essentially an oversimplified negation of the statement 'linear systems are solvable'. This is a true statement, they can be solved exactly if they are reasonably small ...
quarague's user avatar
  • 5,921
10 votes

What is meant when mathematicians or engineers say we cannot solve nonlinear systems?

Your question is indeed overly broad. As asked, the answer is probably that the unsolvability refers to the absence of answers that are essentially formulas of some kind. The numerical methods you ...
Ethan Bolker's user avatar
  • 95.4k
1 vote
Accepted

If $A$ is symmetric positive definite then so is $2D-A$

As you said $D=\operatorname{diag}(A)$. Then $$2D-A$$ is the matrix flipping the signs of all sub diagonals, but the diagonal keep the same entries. Let $x$ be arbitrary vector and $y$ be the one in ...
Angae MT's user avatar
  • 1,031
4 votes
Accepted

Why no one uses the product formula for sine function to calculate $\pi$?

Let $$\tilde\pi_{(m)} = \frac{2}{\prod_{n= 1}^m\left(1-\frac{1}{4 n^2}\right)}=\pi \,\frac{ \Gamma (m+1)^2}{\Gamma \left(m+\frac{1}{2}\right) \Gamma \left(m+\frac{3}{2}\right)}$$ $$\frac{\tilde\...
Claude Leibovici's user avatar
3 votes

Why no one uses the product formula for sine function to calculate $\pi$?

It's obviously slow. Let the sequence be $x_n$ then $\dfrac{x_n}{x_{n-1}}=\frac{1}{1-\frac{1}{4n^2}}\approx1+\frac{1}{4n^2}$ Let's say you wanna have $100$ significant digits then $\frac{1}{4n^2}<\...
ioveri's user avatar
  • 1,451
4 votes

Why no one uses the product formula for sine function to calculate $\pi$?

But how slowly it converge to 𝜋? Are you not able to run numerical calculations yourself? Let $x_N = 2/\prod_{n=1}^N (1 - 1/(4n^2))$. We have $$ x_{100} = 3.133\ldots, \ x_{10^3} = 3.1408\ldots, \ ...
KCd's user avatar
  • 46.1k
1 vote
Accepted

How to choose initial (x0,y0) point to approximate a solution of a system of non-linear equations using newton method?

I will use my answer to Newton method to solve nonlinear system as a guide and you can see another example using this method. The regular Newton-Raphson method is initialized with a starting point $...
Moo's user avatar
  • 11.4k
0 votes

What is the result of 3-digit chopping for 0.000234?

It has been a while, but hopefully, students in the future will benefit from my answer. My book has a very similar definition but adds a couple of details. It says that d_1 can be from 1 to 9 and d_i ...
Lucas Saone's user avatar
1 vote
Accepted

numerically solving for the fixed points of a system of nonlinear ODEs

The answer to this question is there are indeed numerical methods for finding fixed points of nonlinear systems of equations that perform better than randomly peppering the domain with initial values ...
krishnab's user avatar
  • 2,461
1 vote

Compute the correction of a Chebyshev approximation using the Clenshaw summation formula

Use $y_{N+1} = a_{N+1} - y_{N+3} + 2x y_{N+2}$ instead of substituting $y_{N+2}$ in the first term. Because you need to get larger $N$ after expansion. Then $$ \begin{equation} \begin{aligned} \tilde ...
Yimin's user avatar
  • 3,326

Top 50 recent answers are included