Wikipedia:Reference desk/Archives/Mathematics/2019 February 23

= February 23 =

Chords instead of sines
What is the expression of the theorem of sines when using chords instead of sines? Thanks!--93.122.251.206 (talk) 21:13, 23 February 2019 (UTC)


 * You might have to clarify your question; a chord is a line segment connecting two points on a circle. What circle(s) are you thinking of?  –Deacon Vorbis (carbon &bull; videos) 22:58, 23 February 2019 (UTC)
 * Or rather, if you're talking about $$\operatorname{crd}\theta,$$ the chord of an angle as a trigonometric measure, then there's a simple relationship between $$\operatorname{crd}\theta$$ and $$\sin\theta,$$
 * $$\operatorname{crd}\theta = 2\sin\frac{\theta}{2},$$
 * listed at the article I liked above. –Deacon Vorbis (carbon &bull; videos) 23:09, 23 February 2019 (UTC)
 * So in order to have the trigonometric chord of an angle in the law of sines a substitution sine of an angle as a product of sin and cos of the half-angle is needed, right?.--93.122.249.237 (talk) 17:56, 28 February 2019 (UTC)
 * The final expression will be sin theta = crd theta * cos theta/2 substituted in the law of sines?--93.122.249.237 (talk) 18:06, 28 February 2019 (UTC)

General formula for $$\int_{-\infty}^{\infty}\frac{f(x)dx}{1+x^2}$$ in terms of series expansion coefficients of $$f(x)$$
Using heuristic methods, I've found that:


 * $$\int_{-\infty}^{\infty}\frac{f(x)dx}{1+x^2}=\pi\sum_{k=0}^{\infty}\left(c_{k}-c_{k+\frac{1}{2}}\right)$$

where the $$c_{k}$$ are defined in terms of the series expansion coefficients of $$f(x)$$ as:


 * $$f(x) = \sum_{k=0}^{\infty}(-1)^k c_k x^{2k}$$

The definition of $$c_{k+\frac{1}{2}}$$ for integer $$k$$ is not rigorous in the heuristic derivation, but the formula works when working with analytic expressions for the coefficients in terms of factorials and replacing that by gamma functions.

Is there a rigorous derivation of this formula (which should then come with a rigorous definition of $$c_{k+\frac{1}{2}}$$)? Count Iblis (talk) 23:07, 23 February 2019 (UTC)
 * I'm pretty sure you could go a long way with the residue theorem, integrating along a half-circle based on the real axis (of radius > 1, so you lasso the singularity at $$\pm i$$) and taking the limit as the half-circle's radius tends to infinity. One needs to be careful to ensure f extends to an entire function on the complex plane, or otherwise know all of its singularities. It'd be really hard if f's singularities aren't a bounded set. Finally, for the integral to exist, one needs to be careful to not let f grow too quickly along the real axis in either direction.--Jasper Deng (talk) 07:07, 24 February 2019 (UTC)
 * Doing this myself, let us proceed as in the residue theorem article. Then the residue theorem has that $$\oint_C \frac{f(z)}{1 + z^2} dz =2\pi i \frac{f(i)}{2i} = \pi f(i)$$. If the integral along the curved portion of the arc vanishes (as it does for $$f(z) = e^{-itz}$$, the special case used in the article – this actually falls out of the scope of the following derivation since you seem concerned only with f real-valued on the real axis), then this will equal the desired integral itself. So we have derived that under suitable assumptions, $$\int_{-\infty}^\infty \frac{f(x)}{1 + x^2} dx = \pi f(i)$$. Since f is entire, it has a power series expansion about the origin (zero) $$f(z) = \sum_{l = 0}^\infty a_l z^l$$. Plugging in $$z = i$$ yields $$f(i) = \sum_{l = 0}^\infty a_l i^l$$. Your "k" index is just half of my "l" index and rigorously, we have $$c_k = (-1)^k a_{2k}$$. In your infinite sum, your half-index terms are actually complex-valued, but they all sum to zero and would seem unnecessary: we assumed that f is real-valued on the real-axis, so its integral must be real, and therefore the imaginary part $$\sum_{j = 0}^\infty a_{2j + 1}(-1)^j = -\sum_{k = 0}^\infty c_{k + 1/2}/i$$ must be zero. Thus we can ignore the cases $$ l \cong 1, 3 \mod 4$$.
 * So we need to set the condition that f decays "sufficiently quickly" at infinity for the integral along the arc to vanish. This certainly holds if f is bounded. It's difficult to get a weaker condition, since $$\int_{-\infty}^\infty \frac{x}{1 + x^2} dx$$ doesn't exist, while fractional powers are not entire functions and get messy on the negative real axis. So for practical purposes, your formula will be valid only when f is entire and bounded on the real axis.
 * Now this used the heavy machinery of complex analysis. Since your "$$c_{k + 1/2}$$" notion relies on the ability to extend f to the complex plane, I think it's reasonable to assume (the very strong condition) that f is entire and real-valued on the real axis.
 * As a sanity check, what if we used an arc below rather than above the real-axis? Then we'd be concerned with $$-f(-i)$$ instead – but now the residue in question is $$-\frac{f(-i)}{2i}$$, and changing $$i$$ with $$-i$$ is just complex conjugation; any holomorphic function that is real-valued on the real line commutes with taking the conjugate, and taking the conjugate of a real number does nothing, so the result is well-defined.--Jasper Deng (talk) 07:39, 24 February 2019 (UTC)
 * If we want to generalize to where we don't assume f is real-valued on the real axis, then your formula still works but now the "fractional" terms do matter, with the caveat that all your terms will now be complex-valued. The hypothesis that f is bounded still would seem to be required. In my opinion, the series expansion you derived is going to be less useful than just evaluating $$f(i)$$ directly when f is an elementary function. It is now important to choose $$-i$$ and not $$i$$ when defining your $$c_{k + 1/2}$$ terms, i.e. $$c_{k + 1/2} = -i a_{2k + 1}$$, in order for your formula's sign to be correct.--Jasper Deng (talk) 08:23, 24 February 2019 (UTC)
 * Actually, when it is valid to compute the integral using both arcs, it is not possible for the integral to not be real-valued, since computing the integral using the arc below yields the complex conjugate of the computation using the arc above and these can't both be right unless they're the same value, meaning the imaginary part is zero. The only situation where the integral is complex-valued is if computing the integral along one of the arcs (and only one) is valid. Therefore, the choice of plus or minus i in the $$c_{k + 1/2}$$ terms has to depend on context. If the restriction of f to the real line is bounded, that alone may actually be inadequate when that restriction is not real-valued. The integral will still exist but the formula could possibly be invalid (consider a situation where the integral along the curved portion doesn't vanish but instead tends towards a nonzero complex number: your result will then be off by that amount since the residue theorem still asserts that your formula is equivalent to taking the whole contour integral).--Jasper Deng (talk) 09:33, 24 February 2019 (UTC)
 * One final takeback: the above tacitly assumes the (even-degree) coefficients are all real. We can certainly have the integral computable using both arcs and yield a complex value if we allow for complex coefficients for the even-degree terms in the power series.--Jasper Deng (talk) 13:00, 24 February 2019 (UTC)
 * As an example, take $$f(x)=\frac{1}{1+ax^2}$$ where a>0, a≠1. In that case ck=ak and the integral, after some calculus, works out to $$\frac{\pi}{1+\sqrt{a}} = \pi(1-a^{1 \over 2}+a-a^{3 \over 2}+\dots).$$ So it appears that the formula does work if a<1 but the series diverges if a>1. Note that f is not entire in this case. --RDBury (talk) 16:22, 24 February 2019 (UTC)
 * You can still use the residue theorem, it's just that you now have another pole to consider at $$\pm i/\sqrt{a}$$. It should otherwise satisfy the hypotheses of my derivation. Choose the pole above the real axis. $$\frac{1}{1 + ax^2}$$ decomposes as $$\frac{1}{2i\sqrt{a}}(\frac{1}{x - i/\sqrt{a}} - \frac{1}{x + i/\sqrt{a}})$$ so the residue we want is $$\frac{1}{(2i)\sqrt{a}(1 - 1/a)}$$, which when multiplied by $$2\pi i$$ yields $$\frac{\pi}{(1 - 1/a)\sqrt{a}}$$. So the integral comes out to be $$\pi (\frac{1}{1 - a} + \frac{1}{1 - 1/a}) = \pi(\frac{1}{1 - a} + \frac{\sqrt{a}}{a - 1}) =\pi( \frac{1 - \sqrt{a}}{1 - a}) = \pi/(1 + \sqrt{a})$$. Now it is not necessary for f to be entire for the power series centered at zero to make sense, but for the series formula to work, it is necessary that that series expansion be valid in a disk containing $$\pm i$$, which requires that $$0 < a < 1$$. Here, instead of coming from the "imaginary" part of f itself, the $$c_{k + 1/2}$$ terms result from having a second pole included in the calculation. I would expect this interpretation of $$c_{k + 1/2}$$ to be far less general. Indeed, I do not believe it works this way if $$f(x) = \frac{1}{1 + ax^4}$$ (where a is as before).--Jasper Deng (talk) 21:49, 24 February 2019 (UTC)
 * As another example I tried $$f(x)=\frac{1}{(1+ax^2)^2}$$, which gives ck=(k+1)ak. The series for the integral is $$\pi(1-\tfrac{3}{2}a^{1 \over 2}+2a-\tfrac{5}{2}a^{3 \over 2}+\dots),$$ so it still follows the same pattern for a<1. You can work out the integral using residues but it's still a bit of a mystery (to me at least) why when this integral is expanded as a series the +1/2 terms follow the pattern when there is a pattern to follow. For $$f(x) = \frac{1}{1 + ax^4}$$ there isn't a simple formula for ck so I wouldn't really expect there to be a simple formula for ck+1/2 either. Given that it does take a fair bit of calculation to compute the integral (even using residues), it seems rather coincidental that the result is the predicted value when the dust settles. Not that I have an explanation, I'm just saying that I don't see how the residue theorem completely explains it. --RDBury (talk) 07:24, 25 February 2019 (UTC)
 * Well, all the examples you've tried have just one more pole (in addition to the one at i) inside my contour. I'm quite confident that the pattern breaks if you have multiple poles (especially if not on the imaginary axis). The residue theorem can be used to get a pattern for all (natural number) powers of $$\frac{1}{1 + ax^2}$$. But since the OP was asking about a general function, and the fact that "entire function" is much more general than functions of this form, I emphasize again that there's not much to see in your computation. The residue theorem always gives those coefficients; it's just that you're going to need much more complications when the function isn't entire (or at least, holomorphic and sufficiently bounded on the upper or lower half plane). Regarding $$\frac{1}{1 + ax^4}$$, it has the simple expansion $$\sum_{l = 0}^\infty (-ax^4)^l$$, but you're not going to cover all bases by just taking the square root; if anything, fourth roots of a will become involved.--Jasper Deng (talk) 08:17, 25 February 2019 (UTC)
 * Interestingly, Wolfram Alpha gets it wrong. The integral of a real-valued function can't be non-real!--Jasper Deng (talk) 09:42, 25 February 2019 (UTC)
 * It's a bit more complicated than that. The function needn't be real-valued because a needn't be real. Apparently W|A had trouble solving the integral in full generality so it made some assumptions on a. The weird thing is that as far as I can see, the assumptions never hold.
 * You need to give it a bit more guidance on what you expect a to be. For example, like this.
 * By the way, Mathematica gives the same results (unlike other cases where W|A has bugs/quirks that Mathematica does not). -- Meni Rosenfeld (talk) 11:31, 25 February 2019 (UTC)
 * Ok, if you write ck=cos πk/2 ak/4, then WA's series expansion in a says the pattern still works. --RDBury (talk) 15:02, 25 February 2019 (UTC)
 * Not quite, I don’t think. The pattern you give would use the eighth root of a for half integer values of k but the expansion only involves fourth roots. Instead, the half integer terms are all zero.—Jasper Deng (talk) 18:00, 25 February 2019 (UTC)
 * Actually, I just think you made a typo and you meant $$a^{k/2}$$ instead, which does seem to work. This seems to work for all functions of the form $$\frac{1}{1+ax^{2n}}$$ since the poles' residues will contain a factor of $$a^{(2m + 1)/(2n)}$$. I still think this is unique to functions of that form and that trying something else is going to introduce problems. Let's investigate $$\frac{1}{1 + x + ax^2}$$. The function expands as $$\sum_{l = 0}^\infty (-(x + ax^2))^l$$ (which is not a Maclaurin series). In this case, the formula doesn't work, since the coefficients of the Maclaurin series are all rational numbers times a power of a, but the series expansion given by Wolfram Alpha contains non-real coefficients times a power of a and therefore cannot be using the same coefficients as the (even-degree part of the) Maclaurin series, the definition used by the OP of $$c_k$$.--Jasper Deng (talk) 22:28, 25 February 2019 (UTC)
 * I think you might want to take a look at Fractional calculus and in particular the concept of half derivative, it might be related to your $$c_{k+\frac{1}{2}}$$ coefficients. -- Meni Rosenfeld (talk) 11:31, 25 February 2019 (UTC)
 * I think it has something to do with a fractional Taylor series but also still believe it’s got to also have something to do with complex analysis, given the dependence of the behavior of the integral on the poles of the integrand.—Jasper Deng (talk) 18:06, 25 February 2019 (UTC)


 * An example of an integral evaluation using the above formula where the only poles are at $$z=\pm i$$ but where the integral is not simply given by a residue (of a suitable modified integrand) at one of those poles:


 * $$\int_{0}^{\infty}\frac{\exp\left(-x^2\right)}{1+x^2}dx= \frac{\pi}{2}\left(e - \sum_{k=0}^{\infty}\frac{1}{\left(k+\frac{1}{2}\right)!}\right)$$


 * The summation is easily evaluated by considering the function $$g(x) = \sum_{k=0}^{\infty}\frac{x^{k+\frac{1}{2}}}{\left(k+\frac{1}{2}\right)!}$$. This function satisfies the differential equation:


 * $$g'(x) = \frac{1}{\sqrt{\pi x}} + g(x)$$

The solution of this differential equation with boundary condition g(0) = 0 is $$g(x) = \operatorname{erf}(\sqrt{x})\exp(x)$$, therefore we have:


 * $$\sum_{k=0}^{\infty}\frac{1}{\left(k+\frac{1}{2}\right)!} = e \operatorname{erf}(1)$$

The integral can therefore be expressed as:


 * $$\int_{0}^{\infty}\frac{\exp\left(-x^2\right)}{1+x^2}dx= \frac{\pi e}{2}\operatorname{erfc}(1) = \sqrt{\pi}e\int_{1}^{\infty}\exp\left(-x^2\right)dx$$


 * Count Iblis (talk) 10:27, 26 February 2019 (UTC)
 * Of course, the Gaussian function is unbounded on both the lower and upper half-planes, so my original result does not apply, but the residue at $$\pm i$$ is $$\pm \frac{''e'}{2i}$$, meaning that your "fractional" terms' sum arises as the limiting value of the integral along the half-circle as the half-circle expands to infinite radius. In short, your formula seems to generalize several distinct phenomena.--Jasper Deng (talk) 11:31, 26 February 2019 (UTC)