Computer Science and Calc 1

A place to discuss the science of computers and programs, from algorithms to computability.

Formal proofs preferred.

Moderators: phlip, Moderators General, Prelates

mountaingoat
Posts: 80
Joined: Wed Aug 01, 2007 6:01 am UTC

Computer Science and Calc 1

Postby mountaingoat » Thu May 15, 2008 11:40 pm UTC

I'm taking Calc AB (also dual-enrollment) and for our final our teacher is making us do a project that has something do with Calculus.

What can I do that's related to Computer Science but not too difficult?

I was thinking of something like Big O notation, but that's not specifically calculus based. It'd be nice if derivatives/integrals were used somewhere in the project...

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Computer Science and Calc 1

Postby 0xBADFEED » Fri May 16, 2008 12:01 am UTC

You might look at topics in the Numerical Methods field.

This includes algorithms to approximate the derivatives of functions, find roots of functions, etc.

Basically, algorithms that try to determine the properties of continuous functions computationally instead of analytically.

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

darren
Posts: 188
Joined: Fri Feb 08, 2008 5:37 pm UTC

Re: Computer Science and Calc 1

Postby darren » Fri May 16, 2008 12:12 am UTC

Last edited by darren on Tue Sep 09, 2008 12:28 am UTC, edited 1 time in total.

mountaingoat
Posts: 80
Joined: Wed Aug 01, 2007 6:01 am UTC

Re: Computer Science and Calc 1

Postby mountaingoat » Fri May 16, 2008 12:55 am UTC

Hm, those are both great suggestions, thanks!

Quick too. :D

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Computer Science and Calc 1

Postby EvanED » Fri May 16, 2008 2:56 am UTC

Another fun one would be a program that given an expression as input (e.g. sin x * x^2) and a variable, returns the derivative of the expression with respect to that variable.

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Computer Science and Calc 1

Postby qbg » Fri May 16, 2008 4:12 am UTC

EvanED wrote:Another fun one would be a program that given an expression as input (e.g. sin x * x^2) and a variable, returns the derivative of the expression with respect to that variable.

Too easy. Now if you made it return a simplified answer...

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Computer Science and Calc 1

Postby EvanED » Fri May 16, 2008 6:09 pm UTC

qbg wrote:
EvanED wrote:Another fun one would be a program that given an expression as input (e.g. sin x * x^2) and a variable, returns the derivative of the expression with respect to that variable.

Too easy. Now if you made it return a simplified answer...

"Too easy" depends on how much they've covered. If you have to learn how to write a lexer and parser first, it could easily become a reasonable project. I think we talked about it a tiny bit in my AB class a few years ago, but not enough to do this.

And I would expect at least simple simplifications; constant folding, multiplications by 1, additions of 0, and maybe folding of like terms (5x + 3x).

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: Computer Science and Calc 1

Postby skeptical scientist » Sat May 17, 2008 2:42 am UTC

Little o notation uses limits, and I think it shows up in computer science some. Examples of determining little o relationships frequently use l'Hopital's rule. (One can also use l'Hopital's rule to prove various big-O asymptotics.)

You can also combine calculus and big O notation, and prove things like
[math]\sum_{n=1}^N \frac{1}{n} = O(\ln N)[/math]
or
[math]n! = \sqrt{2 \pi n}~{\left( \frac{n}{e} \right)}^n \left( 1 + O \left( \frac{1}{n} \right) \right)[/math]
(Stirling's approximation).
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson


Return to “Computer Science”

Who is online

Users browsing this forum: No registered users and 5 guests