How do I evaluate the Taylor series for ##Si(x)## around a given value?

Click For Summary
SUMMARY

This discussion focuses on evaluating the Taylor series for the sine integral function, Si(x), particularly around values A² and B². Participants explore the approximation of the sine function using the formula $$\sin{(A*B)}\approx \frac{Si(B^2)-Si(A^2)}{2(\ln{B}-\ln{A})$$, emphasizing the conditions under which this holds true, specifically when A and B are close. The conversation reveals that the formula may not be universally applicable, especially for larger values of A and B, and suggests that the logarithmic relationship between A and B is crucial for accuracy.

PREREQUISITES
  • Understanding of Taylor series expansion
  • Familiarity with the sine integral function, Si(x)
  • Knowledge of logarithmic properties and their applications
  • Basic calculus concepts, particularly integration techniques
NEXT STEPS
  • Study the Taylor series expansion of Si(x) in detail
  • Explore numerical methods for approximating integrals involving Si(x)
  • Investigate the convergence criteria for power series
  • Examine the behavior of Si(x) for large values and its asymptotic properties
USEFUL FOR

Mathematicians, calculus students, and anyone interested in numerical analysis or the properties of special functions, particularly in the context of approximating integrals and series expansions.

Kumar8434
Messages
121
Reaction score
5
Hi, I've got this:
$$\sin{(A*B)}\approx \frac{Si(B^2)-Si(A^2)}{2(\ln{B}-ln{A})}$$, whenever the RHS is defined and B is close to A ( I don't know how close).
Here ##Si(x)## is the integral of ##\frac{\sin{x}}{x}##
But, to check it, I need to evaluate the ##Si(x)## function. I'm new with Taylor series, so, how am I supposed to do it? The only confusion is that should I work with the Taylor series of ##Si(x)## around ##x=A^2## or ##x=B^2## to check it? How do I evaluate ##Si(B^2)-Si(A^2)## approximately?
 
Last edited:
Physics news on Phys.org
I think this result is true for any function ##f(x)##. To get the expression for ##f(A*B)##, just replace ##Si(x)## by the integral of ##\frac{f(x)}{x}##.
I think it can be converted into a (maybe) useful result as it would mean:
$$\int_a^b\frac{f(x)}{x}dx\approx f(\sqrt{ab})*\ln{\frac{b}{a}}$$
EDIT: Ok. Now I don't think the above result is true for general functions. It gave a false result for ##f(x)=\ln{x}##.
EDIT2: Sorry, I again checked for ##f(x)=\ln{x}##. I did a mistake last time. It's absolutely true for ##\ln{x}##. I think its true for general functions.
 
Last edited:
If you know how to expand sin(x) in a Taylor series, you can evaluate Si(x) by dividing each term in the series by x and then integrating term by term. After a quick look, my impression is that your result for sin(A.B) works only if A and B are close and not too large.

Try putting B = A + x or
B = C + y,
A = C - y
and expanding the results.
 
Kumar8434 said:
I think it can be converted into a (maybe) useful result as it would mean:
$$\int_a^b\frac{f(x)}{x}dx\approx f(\sqrt{ab})*\ln{\frac{b}{a}}$$

The general pattern appears to be: Given ## a < m < b## then ##\int_{a}^{b} f(x)g'(x) dx \approx f(m) (g(b) - g(a)) ##. So the question is whether the particular case of ## g'(x) = \frac{1}{x} ## and ##m = \sqrt{ab}## is more useful than other examples of that general pattern.
 
Try ##\int_1^4 \frac{(x-2)^2}{x} dx ##.
 
Stephen Tashi said:
Try ##\int_1^4 \frac{(x-2)^2}{x} dx ##.
Yeah, it didn't work for ##f(x)=(x-2)^2##. But I'm convinced that ##\sqrt{ab}## is the most useful candidate for ##m## in case of non-polynomial ##f(x)##.
 
Kumar8434 said:
Yeah, it didn't work for ##f(x)=(x-2)^2##. But I'm convinced that ##\sqrt{ab}## is the most useful candidate for ##m## in case of non-polynomial ##f(x)##.

Try ##\int_{\frac{2}{3}}^{\frac{3}{2}} \frac{ (\ln(x))^2}{x} dx ##
 
Stephen Tashi said:
Try ##\int_{\frac{2}{3}}^{\frac{3}{2}} \frac{ (\ln(x))^2}{x} dx ##
Ok, that didn't work either. But I must say now that ##\sqrt{ab}## is the best choice for 'm' in case of elementary functions which are not compositions of two functions. And, please don't give a clever example to make my expression 0.
 
Ok. I haven't done calculations but now I guess the arithmetic mean might be a better m for any function.
 
  • #10
Kumar8434 said:
Ok, that didn't work either. But I must say now that ##\sqrt{ab}## is the best choice for 'm' in case of elementary functions which are not compositions of two functions. And, please don't give a clever example to make my expression 0.

Can you prove it is really the "best" choice?

That question can be turned into a well-defined problem of calculus. For example: Find the value ##m## that minimizes the function ##S(m) = ( \int_a^b \frac{ f(x)} {x} dx - f(m)(\ln(b) - \ln(a)))^2 ## where ##f(x)## is some elementary function of your choice.
 
  • #11
John Park said:
If you know how to expand sin(x) in a Taylor series, you can evaluate Si(x) by dividing each term in the series by x and then integrating term by term. After a quick look, my impression is that your result for sin(A.B) works only if A and B are close and not too large.

Try putting B = A + x or
B = C + y,
A = C - y
and expanding the results.
I'm not sure but I believe the actual requirement of the formula is ##logA## should be close to ##logB## instead. Could you check it for ##A=100## and ##B=110## by a computer program. I'd have to evaluate too many terms for that.
 
  • #12
Could you check it for A = 100 A 100 and B = 110 B 110 by a computer program. I'd have to evaluate too many terms for that.

There may be ways of calculating the integrals without doing hundreds of terms or using a computer. But let's try a fairly simple sanity check first.
The denominator in the integral will vary between 10,000 and 12,100, roughly a 20% change. Since (1/x) is a smooth function, we can get a reasonable estimate of the integral by holding the denominator constant at its average value of about 11,000. Then all we have to do is integrate sin(x) between x = 12,100 and x =10,000. This integral is the difference in the corresponding cosines, which my calculator tells me is about 1.11. Dividing by 11,000 gives about 1.0x10-4, and dividing that by your denominator equal to 2.ln(1.1) gives about 5.2x10-4.

The left hand side of your equation is sin(11000), which, again according to my calculator, is about -0.96.

I got a similarly unpromising result with B = 2 and A = 1 (it is necessary to integrate the series then), but I'll let you check that for yourself.
 
  • #13
This integral is the difference in the corresponding cosines, which my calculator tells me is about 1.11. Dividing by 11,000 gives about 1.0x10-4, and dividing that by your denominator equal to 2.ln(1.1) gives about 5.2x10-4.

/

I think I made a sign error, meaning the estimate should be -5.2x10-4..

But it seems clear that there is problem with your formula for this range of values. If A and B are of order 100, Si(A2) and Si(B2) must be of order 10-3 or 10-4 unless A and B are so close that the logarithm in the denominator is also very small.

Starting with your values, a shift in A2 or B2 by an amount of order 2π cannot make the absolute value of your formula greater than a few times 10-4 (such a shift could decrease it). But changing A and B by the corresponding amounts in your left-hand side would cause the argument of sin(A.B) to vary by a large fraction of a revolution, meaning that the sine itself could approach ±1.

In other words you could pick values of A and B that were very close to the ones you chose and that would make sin(A.B) = 1; but those values of A and B could not make Si(B2) - Si(A2) any greater than about 10-4.
 
  • #14
John Park said:
I think I made a sign error, meaning the estimate should be -5.2x10-4..

But it seems clear that there is problem with your formula for this range of values. If A and B are of order 100, Si(A2) and Si(B2) must be of order 10-3 or 10-4 unless A and B are so close that the logarithm in the denominator is also very small.

Starting with your values, a shift in A2 or B2 by an amount of order 2π cannot make the absolute value of your formula greater than a few times 10-4 (such a shift could decrease it). But changing A and B by the corresponding amounts in your left-hand side would cause the argument of sin(A.B) to vary by a large fraction of a revolution, meaning that the sine itself could approach ±1.

In other words you could pick values of A and B that were very close to the ones you chose and that would make sin(A.B) = 1; but those values of A and B could not make Si(B2) - Si(A2) any greater than about 10-4.
I already told you that ##logA## and ##logB## should be close, which would make the fractional large even if the numerator is small. Since the graph of logarithm almost becomes parallel to the x axis, so, the formula would work even when A and B differ by large amounts. And, I checked for A=1 and B=2. The value of sin(2) is 0.9 and the formula gave 0.81, which isn't very bad because log2 and log1 differ by 0.69.
 
  • #15
John Park said:
I think I made a sign error, meaning the estimate should be -5.2x10-4..

But it seems clear that there is problem with your formula for this range of values. If A and B are of order 100, Si(A2) and Si(B2) must be of order 10-3 or 10-4 unless A and B are so close that the logarithm in the denominator is also very small.

Starting with your values, a shift in A2 or B2 by an amount of order 2π cannot make the absolute value of your formula greater than a few times 10-4 (such a shift could decrease it). But changing A and B by the corresponding amounts in your left-hand side would cause the argument of sin(A.B) to vary by a large fraction of a revolution, meaning that the sine itself could approach ±1.

In other words you could pick values of A and B that were very close to the ones you chose and that would make sin(A.B) = 1; but those values of A and B could not make Si(B2) - Si(A2) any greater than about 10-4.
And the formula should certainly work if there's no bug in this:
$$\text{Si}\left(x\right)=\text{Si}(a)+\frac{(x-a) \sin (a)}{a}+O\left((x-a)^2\right)$$

Then, composing series
$$\text{Si}\left(B^2\right)=\text{Si}\left(A^2\right)+\frac{2 (B-A) \sin
\left(A^2\right)}{A}+O\left((B-A)^2\right)$$
$$\log(B)=\log (A)+\frac{B-A}{A}+O\left((B-A)^2\right)$$ which make

$$\frac{\text{Si}\left(B^2\right)-\text{Si}\left(A^2\right)}{2 (\log (B)-\log (A))}=\sin \left(A^2\right)+A (B-A) \cos \left(A^2\right)+O\left((B-A)^2\right)$$ while $$\sin(AB)=\sin \left(A^2\right)+A (B-A) \cos \left(A^2\right)+O\left((B-A)^2\right)$$
 
  • #16
And the formula should certainly work if there's no bug in this:
Si(x)=Si(a)+(x−a)sin(a)a+O((x−a)2)

SixSiaxasinaaOxa2

Let's look at the case where x and a are much greater than unity.

Si(∞) is finite, in fact equal to π/2

So Si(a) = π/2 -∫a( sinx/ x) dx
Integrating by parts twice gives
Si(x) = π/2 + cosx/x]a + ∫acosx / x2 dx
=π/2 - cosa/a + ∫acosx / x2 dx
=
π/2 - cosa/a - sina / a2 + 2asinx / x3 dx
The remaining integral cannot be numerically greater than 1/a2; so, replacing a by B2 and A2 successively, we get
Si(B2) - Si(A2) ≈ cosA2/A2 - cosB2/B2 + O(1/A4) +O(1/B4)
which is O(1/A2) if A and B are reasonably close.

If A =100 and B/A =1.1, ln(B2/A2)= 0.19, leaving your expression of order 10-3 at best.

I'm not saying your equations are absurd; they do work (surprisingly) well in most of the cases you've examined, but to me it looks as though they're built on some hidden assumptions that may not always be true, and this is a case where those assumptions don't apply. I suspect the problem is to do with the asymptotic behaviour of Si(x), a function that flattens very quickly.
 
  • #17
And, I checked for A=1 and B=2. The value of sin(2) is 0.9 and the formula gave 0.81, which isn't very bad because log2 and log1 differ by 0.69.

I can't find my earlier calculation and my algebra skills aren't what they were, but I get 0.59 from your formula: Si(4) ≈ 1.767; Si(1) ≈ 0.953; 2ln(2) = 1.386.
 
Last edited:
  • #18
And the formula should certainly work if there's no bug in this:
Si(x)=Si(a)+(x−a)sin(a)a+O((x−a)2)

One more thought. You certainly can't assume the series is converging after two terms unless (x - a)2 is small--meaning much less than unity. It would be instructive to work out a couple of terms in the expansion and consider how they behave when a, x, and (x - a)2 are all greater than unity.
 
  • #19
John Park said:
I can't find my earlier calculation and my algebra skills aren't what they were, but I get 0.59 from your formula: Si(4) ≈ 1.767; Si(1) ≈ 0.953; 2ln(2) = 1.386.
Oh, I guess I had divided by ln(2) instead of 2ln(2) earlier. I always do elementary mistakes even with a calculator. I think you're right. These equations don't work in most cases.
 
  • #20
I always do elementary mistakes even with a calculator.

I make a lot of errors myself these days. To get anywhere is a matter of gathering up time and patience and being prepared to check everything a couple of times.
I would stress, though, that when you develop a power series you should investigate when and how fast it will converge.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
6
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K