Page 6 of 6

Re:Personal Question

Posted: Mon Jun 07, 2004 11:06 pm
by kernel_journeyman
mystran wrote: I think that the "smart kids" aren't necessarily that different from the "averages", except in their interests and experience.
You've just repeated what I said, in a round about way.
I'm not ready to accept that some tasks rely more on intelligence, while others rely on skill. I mean, I've seen people that were bad at math, but needed to learn it for something they wanted to do, and were helped with enough patience, and managed to become good in math. Really good.
Yes! And intelligence really shines in the "dumbest" Joe when they are interested and motivated.
Why the "smart" kids can bother to learn derivatives without being shown how Taylor Series work, is that those kids already can think of reasons why derivatives are useful. They are interested enough in the subject to find the applications themselves, or at least "smell" that they might need it for something later.
You've just repeated what I said again.
Now, I think that a good teacher is one that can get people interested in the subject at hand. A good math teacher for example should be able to show applications relevant to the student.
Ditto.

Thank you for confirming my suspicions. :P ;D

Re:Personal Question

Posted: Tue Jun 08, 2004 12:48 am
by Solar
Pype.Clicker wrote:
You might like to know that Taylor Series can approach any function with any whished precision with a polynom (a0+a1x+a2x?+a3x?+...) where ai are computed with i'th derivate of the function.
Thank you for proving my point, Pype: What's a "Taylor Series", why should I want to "approach a function with any whished precision" or "compute ai with i'th derivate of the function", and what on earth are you talking about? What is it good for? Can you give real-life examples?

8)

Re:Personal Question

Posted: Tue Jun 08, 2004 1:01 am
by kernel_journeyman
Solar wrote: Thank you for proving my point, Pype: What's a "Taylor Series", why should I want to "approach a function with any whished precision" or "compute ai with i'th derivate of the function", and what on earth are you talking about?
8)
You may like to add, "What's it good for?" and "Give clear, real life examples." :P

Re:Personal Question

Posted: Tue Jun 08, 2004 1:20 am
by Solar
Done. ;D

Re:Personal Question

Posted: Tue Jun 08, 2004 9:22 am
by Pype.Clicker
Solar wrote:
Thank you for proving my point, Pype: What's a "Taylor Series"
http://mathworld.wolfram.com/TaylorSeries.html
why should I want to "approach a function with any whished precision" ?
You might have to compute a function which is computationnally very complex and do that very often. If you know in what range you'll need the function and which error you can afford (most computations will include errors anyway), you can define how far you should compute derivates of the functions *around a given point* to have a serie of polynoms that behave *like* the target function.

It may make the complex(like in really hard) function computed veryveryfaster.

Re:Personal Question

Posted: Tue Jun 08, 2004 11:36 am
by Curufir
For Taylor series example see attached code.

This is close to being a real world example. Eg Your pocket calculator calculates cos(x) in a similiar fashion (Not exactly the same, because calculators use a reduction technique to provide predefined constants for a longer series).

Maths is useful.

***

Just dawned on me. Did I ever actually get around to sending you this code Solar?

Re:Personal Question

Posted: Tue Jun 08, 2004 10:41 pm
by Solar
You mean, for the PDCLib? No.

But the demands on math functions in a C Library are unfortunately much higher than that anyway. (Handling of NaNs, infinites, required precision etc.) PDCLib is currently on ice as I'm focussing on getting Astyle 1.17.0 out of the door; expect me to return to working on *that* front by 3Q 2004.

Re:Personal Question

Posted: Wed Jun 09, 2004 7:50 am
by Curufir
Probably a good thing I didn't send it then ;D.

Corner cases are a real pain in the backside for maths functions.

Re:Personal Question

Posted: Wed Jun 09, 2004 8:11 am
by Candy
in this specific case, you can also treat any number with a precision that does not allow a sensible conversion to a number between 0 and 2pi as infinite, and numbers that convert to 0 as 0. You can catch them with an if/then at the entry point. For the rest, expand the series as you see fit.

Must say, never heard of Taylor series but someone did ask me something similar... A maths teacher, as to how you would emulate a block wave with sines.

For the given range, the cosine might just be accurate enough. If not, you can add more calculations. If it ends up being too slow, is there any other algorithm?

And while we're at it, I'd like to know if you can use this inverted, to calculate the arccosine, and what hyperbolic sines are? All still for the PDCLib of course :)

[edit]Jackpot: http://mathworld.wolfram.com/MaclaurinSeries.html [/edit]

Re:Personal Question

Posted: Wed Jun 09, 2004 8:23 am
by Pype.Clicker
Candy wrote: Must say, never heard of Taylor series but someone did ask me something similar... A maths teacher, as to how you would emulate a block wave with sines.
That sounds much like the Fourrier series (which is the basic principle of software spectrum analyzers and Fast Fourrier Transform which are applied in MP3 and JPEG compression/decompression)

Re:Personal Question

Posted: Wed Jun 09, 2004 8:37 am
by Solar
Candy wrote:
For the given range, the cosine might just be accurate enough. If not, you can add more calculations. If it ends up being too slow, is there any other algorithm?
P.J. Plauger's 'The C Standard Library' goes into some detail on this, and he refers to Cody & Waite's 'Software Manual for the Elementary Functions'. I didn't dig into the maths chapters of Plauger, and I didn't order the Cody & Waite (yet), so I can't really comment.

Re:Personal Question

Posted: Wed Jun 09, 2004 9:43 am
by Curufir
Candy wrote: And while we're at it, I'd like to know if you can use this inverted, to calculate the arccosine, and what hyperbolic sines are?
If you can differentiate it then you can form a taylor/maclaurin series to describe it (One is a special case of the other).

The sine waves the teacher mentioned are calculated from a Fourier series, as Pype mentioned. The thing is though that if you understand the maths behind a Fourier series you get an immediate understanding of some of the limitations that representing waves in this form have.

***

I'd agree that maths can be dull as hell, and that a few more real world examples while teaching could make it a little less boring. Problem is that there aren't many real world examples that don't get fairly complicated quite quickly. Mostly what they're trying to do in maths lectures is give you an assortment of mathematical techniques that you can apply when you need to solve a problem. The actual problem is fairly irrelevant, but fully understanding the techniques, and which ones might apply, is pretty crucial when things get complex.

Eg
Knowing that [sup]dy[/sup]/[sub]dx[/sub](x[sup]2[/sup]) = 2x
Doesn't actually help you solve [sup]dy[/sup]/[sub]dx[/sub](cos[sup]2[/sup](x))

However if you know how to differentiate properly then both problems can be approached in exactly the same way.

Re:Personal Question

Posted: Wed Jun 09, 2004 10:09 am
by chris
Maybe a moderator can split this off :)

Re:Personal Question

Posted: Wed Jun 09, 2004 1:51 pm
by Pype.Clicker
chris wrote: Maybe a moderator can split this off :)
not quite in the mood ... the discussion makes sense, stays (though very vaguely) related to the board and is in the 'discover the pals around here' thread. So for me everything is fine with this one so far ...