# Sine and Cosine Integral

1. May 12, 2013

### yungman

I want to study a little bit more of Sine and Cosine Integral. I looked through all my text books including Calculus, ODE, PDE, Linear Algebra...........Nothing!!! I found info on the web, but mostly are definitions. Where is this subject belongs to? Anyone can give me a link to a more complete description?

http://mathworld.wolfram.com/SineIntegral.html?affilliate=1

http://en.wikipedia.org/wiki/Trigonometric_integral

I would like to have a more text book type with some exercise. Thanks.

2. May 13, 2013

### Simon Bridge

There is not much to it.
You need the definition of the integral - i.e. what it means to say you are integrating something and what it's integral would be; and you need the definition of the sine and cosine functions - which would be under trigonometry.

Then it is a matter of relating the two together.

What is it you were hoping to find - specifically?

A freshman college calculus text will have a whole chapter on integrating and differentiating trig functions, as well as sections of other chapters relating to their use. Physics books treating wave equations will also have practical examples.

3. May 13, 2013

### yungman

Sine and cosine integral are nothing like the trig calculus in the ordinary calculus book. It is a definite integral of a Sync function.

$$Si(z)=\int_0^z \frac{\sin t}{t} dt,\;Ci(z)=\int_0^z\frac{\cos (t)-1}{t}dt\;+log(z)+\delta$$

Where $\delta$ is Euler gamma constant = 0.5772.

It is part of the exponential integrals like what the two links I posted in the first post. It is a group of function that cannot be solve by any simple calculus learned from the beginners calculus like Cal I, II, III.

I have at least 5 calculus books, three ODE and three PDE, Advanced calculus, Linear Alg. There is nothing mentioned in all these. Here is another link that is more detail.

http://functions.wolfram.com/GammaBetaErf/SinIntegral/introductions/ExpIntegrals/ShowAll.html

But it does not explain how these functions come about. And the solution is very complicated. I would like to see more working examples.

Thanks

Last edited: May 13, 2013
4. May 13, 2013

### Simon Bridge

Ah - so many people use "Sine" to be the same as "sin()".
That makes a LOT more sense.

Math books will tend to study them as a class of function

They appear a lot in signal processing, also in diffraction about a plane edge.
Also see Bessel functions.

You'll see the related Cornu Spiral crop up too.

I think I first saw these in quantum mechanics text books.

5. May 13, 2013

### yungman

Thanks for the answer. This came up in the part of calculation of radiating power of antenna. I have been looking at it today, it is very hard to solve by hand. My next question is whether Wolfham math workd provide any online calculator that can solve these. If not, any other free calculator that can solve these?

I guess knowing Bessel function or Gamma function don't really help much in terms of getting a real answer by hand!!! So I think I might have to settle with finding a software to get the answer. Any suggestion?

Thanks

6. May 13, 2013

### Simon Bridge

You don't go for exact solutions by hand.
The sources you already have should be able to give you various expansions.
But look to numerical methods.

7. May 13, 2013

### yungman

So should I review the Bessel, Gamma function. It's been a while since I studied those in PDE. Any pointers where to get more information?

8. May 13, 2013

### Integral

Staff Emeritus
Look for some advanced Optics books, you should find applications and some solution aids.

IIRC the cornu spiral mentioned above is a solution aid for these intergrals.

9. May 13, 2013

### yungman

Thanks

I looked at two sites relate to cornu spiral, I don't see any similarity in how to solve my problem.

Is there any easy way to solve the sine an cosine integral? Does it even help to review Gamma and Bessel function?

Seems like it is very involve to find the solution of sine and cosine integral, any software that can do that. This is only a very small part of all the things I have to study, I prefer not to get too involve in this if I can have a way to get the answer. I am not studying math, it's just part of the antenna design.

10. May 13, 2013

### Simon Bridge

I'm sorry - I reread your post so far and this is the first that you have mentioned that you have a specific problem to solve.
This is why the replies have been telling you about related fields.

The usual suspects: Octave, Matlab, Mathematica... you just want to solve an equation that came up in antenna design? Then a quick numerical solution should do you fine.

11. May 13, 2013

### yungman

Yes, I need to solve the equation that comes up in antenna design. I am even willing to budget a few days to study the math if I can find exactly what to study. Actually I am at the process of reviewing Gamma Function and Bessel Function ( which has all the Gamma function in it!!) per your suggestion, it's been a while.

So my bottom line is I want to find an online line calculator if possible, but if I can study this in a few days, I would stop and study this also.

So far, all the articles on these sine and cosine integrals, the solution involve the six or so Exponential integrals......which by themselves, are no easier to solve and involve the other Exponential integrals. So I am going in a circle!!!

If you can point me to a way to actually solve the problem, I am interested in learning it even though I likely use the online calculator in the future. I am not a math major, but experience tell me it's always pay off in the long run if I take the time and learn the math, which I usually do. That's the reason I am willing to take a few days off for this.

Thanks

Alan

12. May 13, 2013

### SteamKing

Staff Emeritus
13. May 13, 2013

### yungman

I have the Advanced Calculus by R. Creighton Buck and it does not have these functions. Any other text books you can suggest?

14. May 13, 2013

### yungman

15. May 13, 2013

### SteamKing

Staff Emeritus
You can find A & S online as a .pdf or .html file. Having a copy on your computer makes it really easy tolook up stuff.

Some of these special functions, particularly elliptic integrals, could be found in Schaum's Outline of Advanced Calculus by Murray Spiegel.

16. May 13, 2013

### SteamKing

Staff Emeritus

http://en.wikipedia.org/wiki/Special_functions

NIST Digital Library of Spec. Functions: http://dlmf.nist.gov/

W.W. Bell, Spec. Func. for Sci. and Engrs. (pdf Book)
http://www.plouffe.fr/simon/math/Be...ngineers (Van Nostrand, 1968)(K)(T)(257s).pdf

Most of these Spec. Functions are used at the graduate level, but not so much at the undergrad level.
Gamma and Erf are used for undergrad statistics. Numerical methods have replaced explicit use of a lot of these functions, esp. where they would show up as solutions to differential or integral equations.

17. May 13, 2013

### yungman

Ha ha, I am still old school!!! I like things I can touch. When I read I book, I make notes and draw on the book. By the time I finished with the book, it look like crap!!! I am looking into ways to make notes and drawing on electronic books, so far, I am not having luck. I am having a collection of math, classical physics and RF electronics books, that' my pride and joy that I can refer back to any time I need to.

I have the Advanced Calculus by Schaum's by Murray Spiegel. I can't find it. It has Gamma and Beta functions, but nothing further. If you know what page, let me know as I only read the description of the chapters at the beginning and looked in the index. I did find a little on this in "Advanced Mathematics for Engineers and Scientists" of Schaum's by Murray Spiegel I have. But it barely cover it, more on Gamma and Bessel. I am running out of ideas.

I have a question, is it useful to review Gamma and Bessel's function for this. I have no idea. Short of having some solid notes, this is what I am doing for now.

Last edited: May 13, 2013
18. May 14, 2013

### yungman

http://en.wikipedia.org/wiki/Trigonometric_integral

$$Si(x)=\int_0^x\frac{\sin x}{x}dx=\sum_0^{\infty}\frac{(-1)^n x^{2n+1}}{(2n+1)!(2n+1)}$$

So do I just fill in the value of x and expand out a few terms and see whether the terms converge to zero. Then make assumption how many to cut off?

Also, if you look at the integration:$Si(x)=\int_0^x\frac{\sin x}{x}dx$, x can be say 4, or can be 1000. But the numerical equation has no consideration of that. Do I just expand it out and then determine when to stop when the higher terms gets smaller and smaller?

Last but not the least, if the numerical equation is correct, I see no reason of reviewing back the Gamma and Bessel functions. Yes, this is similar to Bessel function in the sense it is numeric, but it is an equation on it's own, there is no need of Gamma and Bessel function that I can see. I finished reviewing Gamma function, but Bessel is long!!! I don't want to review Bessel if I don't need it.

19. May 14, 2013

### SteamKing

Staff Emeritus
The trig functions (sine, cosine, etc.) have similar series expansions, but most people are content to use the buttons on the calculator to churn out the number.

You mentioned that you are using Si and Ci to solve a particular problem. While you are interested if finding out more about such functions, don't lose sight of the original goal. If you have found an app which can evaluate sin (x) and Si (x), use it.

With regard to Spiegel, I am surprised that you did not come across Elliptic functions in the text (am, sn, cn, dn). I don't have my copy either, but the index should point you to the correct section.

20. May 14, 2013

### D H

Staff Emeritus
No!

That series, like many Taylor series, is incredibly ill-behaved when applied over a wide range using IEEE floating point representation (single or double precision floating point). For example, look what happens with x=1000. The largest term (absolute) is over 10426 for n=499. That of course is not representable as an IEEE double. The series will evaluate to infinity instead of something close to pi/2. Things are bad even with a much lower value, for example x=40. Use this series with IEEE doubles and the result will have *one* significant digit no matter how many terms you use. For values of x>=44 the result has *zero* significant digits. Precision loss begins to kick in at around x=2. You don't want to use the series for values of x larger than 2 (maybe 4).

Rather than rolling your own, look for existing implementations. Numerical Recipes has a simple but slow implementation. The GNU scientific library has a much faster, and slightly more accurate implementation.

21. May 14, 2013

### Integral

Staff Emeritus
The Cornu spiral is a graphical aid for doing exactly what you want. That is why I suggested an advanced Optics text, it should explain how to use it.

22. May 14, 2013

### yungman

Thanks for the detail reply. I don't know what is IEEE floating point. Can you explain this a little on how many decimal place single or double precision means? So you mean don't use the series formula if x≥4?

This is the equation that I am really trying to solve:

$$\int_0^{\pi} \frac {\cos \left ( \frac{kl}{2}\cos \theta \right )}{\sin\theta} d\theta$$

Where $\frac{kl}{2}\;≤2\;\pi$ or 6.2832. So the value is not very high as most antenna are less than 2λ.

I don't know GNU scientific library, sounds like it's program for C++ programmer......which I am not!!!

So, bottom line, I should give up trying to solve by hand and just find an online calculator to get the answer?

23. May 14, 2013

### yungman

There is calculator that can do this?!!!! I need to get out more!!! Any suggestion which calculator to buy? I've been retired 8 years from the electronics industry and I'm not going to school. I am just studying as a hobby, this is better than cross word puzzle!!!. I don't have co-workers or instructor as a resource. This is about the only place I get info!!!

I gone through the index and scan through the description of the chapters, none shown.

Sounds like it is good to understand this subject, but get on with my study by using the software or calculator available.

Last edited: May 14, 2013
24. May 14, 2013

### yungman

Just for the fun of it, I expand this to n=7.

$$Si(x)=\int_0^x\frac{\sin x}{x}dx=\sum_0^{\infty}\frac{(-1)^n x^{2n+1}}{(2n+1)!(2n+1)}$$

$$=x-\frac {x^3}{18}+\frac{x^5}{600}-\frac {x^7}{35280}+\frac{x^9}{3265920}-\frac{x^{11}}{4.391X10^8}+\frac{x^13}{13X13!}-\frac{x^{15}}{15X15!}$$

$$\;=\;6.28-13.76+16.2797-10.919+4.65-1.365+0.2874-.0475=1.40557$$

You can see the number converge after 8 terms. I am sure another 2 terms will bring it very close to exact. Seems like it's doable for antenna up to length of 2$\lambda$.

Last edited: May 14, 2013
25. May 14, 2013

### D H

Staff Emeritus
You were a bit sloppy there. The partial sum of the first 8 terms of Si(6.28) is 1.412651...

The precision loss here isn't all that bad. You'll be off by a couple of ULP with double precision numbers if you take the series out to twenty terms.

Why bother with the series, however, when you can just use Wolfram Alpha and get the answer just like that?