Hard Light Productions Forums

Off-Topic Discussion => General Discussion => Topic started by: Kosh on January 10, 2009, 08:29:10 pm

Title: Math question
Post by: Kosh on January 10, 2009, 08:29:10 pm
How to find the integral of sqrt(cosx) dx?
Title: Re: Math question
Post by: General Battuta on January 10, 2009, 08:57:46 pm
I don't think that's an integral you can take without higher-order math (doesn't it require an elliptical integral?)

Maybe I'm wrong.
Title: Re: Math question
Post by: portej05 on January 10, 2009, 11:59:34 pm
How to find the integral of sqrt(cosx) dx?

Let's not go there  :eek:
Title: Re: Math question
Post by: Kosh on January 11, 2009, 07:59:25 am
I don't know where to begin with this, anyone got any ideas?
Title: Re: Math question
Post by: portej05 on January 11, 2009, 08:13:33 am
It's not a pretty one... and General Battuta is right, it does need an Elliptic function.
)&random=false]The Answer (http://integrals.wolfram.com/index.jsp?expr=Sqrt(Cos[x)

I'm not sure how I'd go about this one - I went straight to Mathematica. The reason for its difficulty is that at some point you're taking the integral of an imaginary number - and this is something I don't know how to do. (cos(180)=-1).
What class is this for?
Title: Re: Math question
Post by: phreak on January 11, 2009, 08:38:52 am
Try 42
Title: Re: Math question
Post by: Mika on January 11, 2009, 09:49:39 am
If you managed to see the post I had here earlier, forget it. It was wrong.

I'll try again later.

Mika
Title: Re: Math question
Post by: BloodEagle on January 11, 2009, 11:02:14 am
Try 42

Seconded.  :lol:
Title: Re: Math question
Post by: CP5670 on January 11, 2009, 11:47:32 am
As others have said, this is a basic example of a type 2 elliptic integral.

Are these problems from some class or are you making them up yourself? The last one you brought up wasn't expressible in terms of elementary functions either.

Quote
it does need an Elliptic function.

That is actually an elliptic integral. Elliptic functions are a little different, although there is a connection.

Quote
The reason for its difficulty is that at some point you're taking the integral of an imaginary number - and this is something I don't know how to do. (cos(180)=-1).

It's the same thing, you just deal with the real and imaginary parts separately. It looks like he just wants an antiderivative here though, so it does not necessarily have to be complex valued.
Title: Re: Math question
Post by: portej05 on January 11, 2009, 12:19:49 pm
It's times like these that I thank my course advisor for not pushing me towards maths :P I'll take physical electronics anyday.
Title: Re: Math question
Post by: Mika on January 11, 2009, 01:59:57 pm
int{ sqrt(cos(x))  dx} || Substitute x=arccos(y), solve dx = -dy/sqrt(1-y^2)

int{ -  sqrt(y) * dy/sqrt(1-y^2) } || Which could have been analytically intergrated it the nominator had been y.

The above is now the basic definition of an elliptic integral. http://en.wikipedia.org/wiki/Elliptic_integral mentions specifically that the degree of the polynomial inside the square root should be from 3 to 4, which could be arranged by writing y^2=z^4 (and y=z^2).

EDIT: Not to mention, if one rewrites y=z^2, one should also rewrite the differential.

Mika
Title: Re: Math question
Post by: Mika on January 11, 2009, 02:10:33 pm
Now, my continuation question would be what kind of course are you studying since you continuously meet special functions? During the six years I have been doing research and engineering work, I haven't had the need to use any special functions!

Instead, splines, Newton iteration, numerical integration and Taylor series have proven to be quite effective in decimating possibilities that I would need to handle special functions.  :pimp:

Mika
Title: Re: Math question
Post by: CP5670 on January 11, 2009, 02:20:40 pm
Quote
Now, my continuation question would be what kind of course are you studying since you continuously meet special functions?

You run into them frequently in complex analysis, PDEs or number theory, but I doubt that's where his questions are coming from. :p
Title: Re: Math question
Post by: Mika on January 11, 2009, 02:33:14 pm
I must have had a really nice teacher since I didn't meet any of those thingies in complex analysis. In differential equations, they mentioned something about those Gamma functions, Legendre polynomials and some other polynomial thingie, but as one can guess I really don't remember anything of them. I also have some sort of factor of hatred towards them, especially since Legendre polynomials occured in Quantum Mechanics and we all know Quantum Mechanics suck. :D I thought it was much more important to recognise that "Oh no, not you son-of-a-***** again!"

And nowadays in Optics field it's next to impossible to actually write an integral, much less to solve it analytically. Numerics for the win!

Mika
Title: Re: Math question
Post by: CP5670 on January 11, 2009, 04:22:22 pm
I used to big into special functions some years ago and remember them fairly well. :p I still sometimes encounter them in a math/signal processing context.

Was the complex analysis an undergrad or grad course? Most of the big results on normal families (like the Picard theorem) are based on the geometric behavior of this thing (http://en.wikipedia.org/wiki/J-invariant), so they bring it up at some point. They usually also talk about the gamma function in that class, just because it comes up in many places but isn't covered anywhere else in depth.
Title: Re: Math question
Post by: Mika on January 11, 2009, 06:41:40 pm
??? Where do you actually see special functions in signal processing? In the signal processing theory?

The two complex analysis courses were probably undergrad courses. And even then, Physics department had already taught almost everything that was in those courses, with the exception of residuals. So, in the end, I'm not sure what they talked about in the lectures, I never attended them. The only thing I did was calculating through the assignments and carefully builded up my arsenal of mathematical tools to solve problems.

That is actually the story of all mathematical courses I had. It started with Linear Algebra when they were too enthusiastic in proving some things, while ignoring the practical things that could have tied those terms and corollaries to something significant. I quit sitting on the lectures maybe on the second or third week realizing that this is not really going to teach me anything.

In the end I just calculated through assignments, memorized the proofs and went to exams. I failed several times in different courses, but finally passed just above the rim in all cases (in Physics I was better than average student). I know that in other parts of the world this would have resulted in me being kicked out of the university, but such is the schooling system here that it doesn't happen. It would have served me much more better if I had taken the Maths courses that were organised by Engineering Sciences rather than Mathematical Sciences.

The best thing is that on most occasions I'm better in calculating than Mathematicians themselves. :nervous:

Mika
Title: Re: Math question
Post by: portej05 on January 11, 2009, 08:00:50 pm
It started with Linear Algebra when they were too enthusiastic in proving some things, while ignoring the practical things that could have tied those terms and corollaries to something significant

And they had the lectures at 8am...
Title: Re: Math question
Post by: CP5670 on January 11, 2009, 10:46:32 pm
Quote
??? Where do you actually see special functions in signal processing? In the signal processing theory?

Yeah, the example I had in mind is related to this (http://en.wikipedia.org/wiki/Sampling_theorem) in the setting of arbitrary, non-uniformly spaced samples. This turns out to be a very complicated issue and there are some quite surprising results on what types of sequences of sampling points work. One recent result on this (paraphrased a lot) says that this (http://en.wikipedia.org/wiki/Product_log) function describes the least possible deviation you can have from a uniform sequence, in order for there to be no loss of information in the analog-to-digital conversion process.

Another, much simpler place is an algorithm for predicting future values of a signal (very similar to this (http://en.wikipedia.org/wiki/Linear_predictive_coding)), which involves doing a least squares fit to a spline made up of si (http://en.wikipedia.org/wiki/Sine_integral) functions.

If you are familiar with this stuff, I can go into more detail. I could talk about this all day. :D

Quote
The best thing is that on most occasions I'm better in calculating than Mathematicians themselves.

I wouldn't be surprised. There are many great symbolic and computational tricks that are taught in physics departments and are very useful in pure math as well, but are often not covered by the math students these days. :p I learned many such techniques from various books, outside of classes.
Title: Re: Math question
Post by: portej05 on January 11, 2009, 11:08:03 pm
My final year project is in Signal Processing.
It's an application of Successive Mean Quantisation Transforms to audio processing and a study of its performance for the case we've got (we're still nutting out the proposal, so I'll keep things hazy for now) - I'll post more details when the proposal has been finalised with my supervisor (the deadline is about 2 months from now, but I'm doing some prereading)

Mr Nyquist, we meet again.
Title: Re: Math question
Post by: Kosh on January 11, 2009, 11:34:19 pm
Quote
Are these problems from some class or are you making them up yourself? The last one you brought up wasn't expressible in terms of elementary functions either.


Class. There is no way I would spend my free time making up this ****.

The whole question is something like this:

Find the length of y=integral from -pi/2 to x of sqrt(cost)dt.

The book's answer is 4.
Title: Re: Math question
Post by: portej05 on January 11, 2009, 11:42:08 pm
Which book is this?
Can you post the whole question - I think there's something missing from the problem statement as-is
Title: Re: Math question
Post by: CP5670 on January 11, 2009, 11:45:58 pm
Quote
My final year project is in Signal Processing.
It's an application of Successive Mean Quantisation Transforms to audio processing and a study of its performance for the case we've got (we're still nutting out the proposal, so I'll keep things hazy for now) - I'll post more details when the proposal has been finalised with my supervisor (the deadline is about 2 months from now, but I'm doing some prereading)

Mr Nyquist, we meet again.

The funny thing is that Nyquist had little to do with the sampling theorem, but his name somehow became attached to it and many related concepts later on. :p

Quote
Which book is this?
Can you post the whole question - I think there's something missing from the problem statement as-is

I agree, the problem makes no sense as you have stated it. What is the "length of y" supposed to mean?
Title: Re: Math question
Post by: Rian on January 12, 2009, 12:11:36 am
Wait, is it a curve length problem? As in, the length of the curve defined by that integral? Something like this? (http://www.maths.abdn.ac.uk/~igc/tch/ma1002/int/node21.html)


Title: Re: Math question
Post by: Mika on January 12, 2009, 02:25:53 pm
I'm only familiar with Optical signal processing, it doesn't involve anything of those functions. Instead of being temporally bounded, it is usually spatially bounded by limiting apertures and detector sizes. Though we usually think of spot sizes (the image of a point source) and modulation transfer function values at certain spatial frequencies.

Mika
Title: Re: Math question
Post by: Mika on January 12, 2009, 02:36:10 pm
Quote
And they had the lectures at 8am...

Yes they did. Los Bastardos.

Quote
Mr Nyquist, we meet again.

Shouldn't that be more like:
[Brannigan]
You win again, Mr Nyquist!
[/Brannigan]

My approach to questions regarding whether the system is accurate enough or not was simply making sure that it was accurate enough. Meaning that I compute the Nyquist limit and multiply it by a random constant between 3 and 10, depending on the possibilities. (3-10 times oversampling). At least there is some room for error, since accuracy can be lost ridiculously easily (by other human factors excluding, of course, me), but cannot be gained back by any means.

Mika
Title: Re: Math question
Post by: portej05 on January 12, 2009, 11:02:25 pm
Quote
And they had the lectures at 8am...

Yes they did. Los Bastardos.

Quote
Mr Nyquist, we meet again.

Shouldn't that be more like:
[Brannigan]
You win again, Mr Nyquist!
[/Brannigan]


I was thinking 'MR ANDERSON, good to see you!'
Title: Re: Math question
Post by: Kosh on January 13, 2009, 05:10:45 am
Which book is this?
Can you post the whole question - I think there's something missing from the problem statement as-is


Yeah, sorry I forgot to put in the curvature part. Find the length of the curve y= integral of sqrt(cost) dt from -pi/2 to x.

The book is  this (http://bookd.bi3jia.com/bookcmp_583359.html)
Title: Re: Math question
Post by: portej05 on January 13, 2009, 05:53:23 am
I still don't think we've got all the information.
Can you post a picture of the question?
Also, we don't have the value of 'x'
Title: Re: Math question
Post by: portej05 on January 13, 2009, 06:55:26 am
Turns out that you don't need to evaluate the integral of sqrt(cos(x)).
I've had a quick chat with a mate of mine (transcipt below) who has a solution and gets the same answer
Hope this helps.

WB: Actually, that integral comes out quite nice. The indefinite integral turns out to be 2*Sqrt(1+Cos(x))*Tan(x/2)
portej05: How come integrals.wolfram.com throughs out something hideous?
WB: Probably because you didn't enter exactly what I was evaluating. Note that in the previous expression, I had a y'(x) ... where y(x) is the integral from the forum.
portej05: http://integrals.wolfram.com/index.jsp?expr=Sqrt(Cos(x))
WB: Exactly, and then you take the derivative of that (Sqrt(Cos[x))), square it (Cos(x)) and you're left with Integrate(Sqrt(1+Cos(x)),{x,x_1,x_2}), which evaluates nicely.
portej05:ah, I see
WB: Actually, I may have just figured out the last bit of that question. The integral is complex if x isn't in (-pi/2,pi/2)...
Title: Re: Math question
Post by: Mika on January 13, 2009, 02:21:20 pm
First, I really have hard time in buying that. Second, I think the x-value should be specified if one wants to get a numerical answer.

Numerically integrating sqrt(cos(x)) from -pi/2 to pi/2 with 2000 intervals yields 2.3963, nothing close to 4.0000.
Anything above (or below!) that will include a complex part which can't be made to vanish.

For integrating sqrt(cos(x)), from -pi/2 to pi/2, it is not even theoretically possible to obtain value larger than pi. Why? The x-axis is defined with radians (3.14) and no matter how many square roots one takes from the cosine function value, one cannot get its value above 1 since the cosine is restricted to be equal or less than 1!

That is unless your friend can explain a little bit carefully why he arrived in the conclusion. Moments like these make me wish I could include some nifty MATLAB figures here that would make it a lot easier to visualize. I can provide the MATLAB function to do this, though.

Mika
Title: Re: Math question
Post by: General Battuta on January 13, 2009, 02:40:19 pm
Are you sure it's not a curve length problem?
Title: Re: Math question
Post by: CP5670 on January 13, 2009, 02:51:11 pm
Okay, I see what's going on here. Kosh stated the question in a really roundabout way. :p The problem is to find the arc length of the antiderivative of sqrt(cos(x)) over (-pi/2,pi/2). In other words, you don't need the actual antiderivative of that thing at all, since whatever it is, you would just be differentiating it again. The reasoning portej05's friend gave is correct.

Quote
Are you sure it's not a curve length problem?

It is. That explains where the answer of 4 comes from, and also why this is presumably appearing in a calculus class. I've never seen a calculus level problem that requires special functions. :p
Title: Re: Math question
Post by: Mika on January 13, 2009, 03:08:04 pm
OK, if that is the actual question then his friend is correct.

Quote
It is. That explains where the answer of 4 comes from, and also why this is presumably appearing in a calculus class. I've never seen a calculus level problem that requires special functions.

[Cough] Bessel function [/Cough]
[Cough] Fresnel integrals [/Cough]
...and some other came across while still being in the calculus level...

Mika
Title: Re: Math question
Post by: Mika on January 13, 2009, 03:12:42 pm
By the way Kosh, why are you using Chinese book if you are from US? What is that book about?

Mika
Title: Re: Math question
Post by: General Battuta on January 13, 2009, 03:25:30 pm
Wait, is it a curve length problem? As in, the length of the curve defined by that integral? Something like this? (http://www.maths.abdn.ac.uk/~igc/tch/ma1002/int/node21.html)




That might be of some help, then.
Title: Re: Math question
Post by: CP5670 on January 13, 2009, 03:46:39 pm
Quote
[Cough] Bessel function [/Cough]
[Cough] Fresnel integrals [/Cough]
...and some other came across while still being in the calculus level...

By calculus level, I meant the basic, first semester stuff (which is about the only time you encounter problems like this). At least I haven't seen special functions in any standard textbooks on calculus. They might be covered in physics or engineering oriented "methods" classes, although those are typically more advanced.
Title: Re: Math question
Post by: Mika on January 13, 2009, 04:11:01 pm
Yeah, when they teach basics, they usually don't want to include any special functions. Unfortunately, the basics took about 2 months and after that it was pretty much anything was supposed to go (but of course didn't). We were a kind of a class that got special treatment since they decided that Physicists from that year on do not read basic courses. The course material was made more easy in the next year.

I remember cursing - so did the assitants - quite a long time about one capacitor related assignment, it had something to do with a metallic sheet coated on both sides by material whose dielectric coefficient was on upper side e1 and e2 on the lower. Compute the capacitance of the capacitor formed by rolling the metallic sheet (after rolling, the sheet looks like a spiral if viewed from above)... mind you, this was actually on the first year and in an introductory course of electromagnetism.

Mika
Title: Re: Math question
Post by: Kosh on January 14, 2009, 01:47:59 am
By the way Kosh, why are you using Chinese book if you are from US? What is that book about?

Mika


Because I am not IN the US. That book is about math.
Title: Re: Math question
Post by: portej05 on January 14, 2009, 01:57:25 am
 :D

Where are you? (HLP) (http://www.hard-light.net/forums/index.php/topic,58055.msg1171636.html#msg1171636)
Title: Re: Math question
Post by: Mika on January 14, 2009, 01:33:23 pm
Quote
Because I am not IN the US. That book is about math.

In that case, do you have any possibility of not using a Chinese study book?

Mika
Title: Re: Math question
Post by: Kosh on January 15, 2009, 04:39:41 am
No.