Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Many computer science programs require two or three calculus classes.

I'm wondering, how and when is calculus used in computer science? The CS content of a degree in computer science tends to focus on algorithms, operating systems, data structures, artificial intelligence, software engineering, etc. Are there times when Calculus is useful in these or other areas of Computer Science?

share|cite|improve this question
1  
We don't have a strict policy for list questions, but there is a general dislike. Please note also this and this discussion; you might want to improve your question as to avoid the problems explained there. If you are not sure how to improve your question maybe we can help you in Computer Science Chat? – Raphael 21 hours ago
    
Community votes, please: too broad? – Raphael 21 hours ago
8  
You seem to make the common mistake of assuming that the content of every course has to be relevant (for every career path). Sometimes is just about training you how to think in certain ways. – Raphael 21 hours ago
2  
It would probably be helpful if this question could clarify whether you're only asking about uses within Computer Science proper or all of the uses for the students who are getting a Comp Sci degree. At least here in the U.S., a very large percentage of Comp Sci graduates become software engineers spread out over just about every engineering domain imaginable. Many of these domains require understanding Calculus for various purposes. Not all CS grads will use Calculus in their jobs, but many certainly will (probably more than who think they will during their Freshman year.) – reirab 17 hours ago
1  
"If a question is valuable enough that you believe it belongs on the site, chances are you don't need it to be community wiki!" - blog.stackoverflow.com/2011/08/the-future-of-community-wiki Note that you can suggest edits to existing answers, to flesh them out. – D.W. 14 hours ago
up vote 36 down vote accepted

I can think of a few courses tht would need Calculus, directly. I have used bold face for the usually obligatory disciplines for a CS degree, and italics for the usually optional ones.

  • Computer Graphics/Image Processing, and here you will also need Analytic Geometry and Linear Algebra, heavily! If you go down this path, you may also want to study some Differential Geometry (which has multivariate Calculus as a minimum prerequisite). But you'll need Calculus here even for very basic things: try searching for "Fourier Transform" or "Wavelets", for example -- these are two very fundamental tools for people working with images.
  • Optimization, non-linear mostly, where multivariate Calculus is the fundamental language used to develop everything. But even linear optimization benefits from Calculus (the derivative of the objective function is absolutely important)
  • Probability/Statistics. These cannot be seriously studied without multivariate Calculus.
  • Machine Learning, which makes heavy use of Statistics (and consequently, multivariate Calculus)
  • Robotics, where you will need to model physical movements of a robot.
  • Discrete Math and Combinatorics (yes!, you may need Calculus for discrete counting!) -- if you get serious enough about generating functions, you'll need to know how to integrate and derivate certain formulas. And that is useful for Analysis of Algorithms (see the book by Sedgewick and Flajolet, "Analysis of Algorithms"). Similarly, Taylor Series and calculus can be useful in solving certain kinds of recurrence relations, which are used in algorithm analysis.
  • Analysis of Algorithms, where you use the notion of limit right from the start (see Landau notation, "little $o$")

There may be others -- this is just off the top of my head.

And, besides that, one benefits indirectly from a Calculus course by learning how to reason and explain arguments with technical rigour. This is more valuable than students usually think.

share|cite|improve this answer
12  
Perhaps you had a different experience, but I found calculus pretty useless for learning how to reason and explain arguments rigorously. It was taught by rote and pattern matching pretty much like high school algebra and geometry. On the other hand, it was the prerequisite to several higher math classes that did teach these skills, so I suppose it wasn't entirely useless. – tsleyson yesterday
    
Well, I did prove some theorems while learning Calculus -- not many of them, but enough to understand what "proving" things was about... And I did some modeling, which also helped develop some different way of thinking. – Jay yesterday
1  
I can totally relate to the very last point (indirect benefits). Working on programming languages theory, I rarely used calculus directly. Perhaps the most direct application was in probabilistic computational models (e.g. Plotkin&Jones probabilistic powerdomains). Yet, my calculus course was mostly about proving things, and this was very, very valuable. One or two calculus courses are IMHO needed in every serious CS program, along some more math (discrete math, logic, linear algebra, numerical analysis, ... and possibly categories, topology, algebra, ... ). – chi 23 hours ago
5  
My required calculus courses didn't have any proofs in them either, just as @tsleyson describes. Later on I went out of my way to take a "real analysis" course as an elective which was basically "rigorously prove all the stuff you learned in calculus". – Ixrec 20 hours ago

Numerical Methods. There exist cumbersome calculus problems that are unique to specific applications, and they need solutions faster than a human can practically solve without a program. Someone has to design an algorithm that will compute the solution. Isn't that the only thing that separates programmers from scientists?

share|cite|improve this answer
2  
Given the "list" nature of this question, every answer should attempt to give the full picture. Are you certain you want to claim that numerical methods are the only instance? – Raphael 21 hours ago
4  
@Raphael: An answer can add value without being an attempt at a complete list, no? Surely every answer should attempt to add value to the site, not repeat information already covered well in other answers. – Eric Lippert 15 hours ago
    
For many sorts of simulation work, you'd need to go beyond calculus to differential equations &c. – jamesqf 14 hours ago
    
@EricLippert And that's why we dislike list questions! – Raphael 1 hour ago

Automation - Similar to robotics, it can require quantifying a lot of human behavior.

Calculations - Finding solutions to proofs often requires calculus.

Visualizations - Utilizing advanced algorithms requires calculus such as cos, sign, pi, and e. Especially when you're calculating vectors, collision fields, and meshing.

Logistics and Risk analysis - Determining whether something is possible, the risk involved, and possible rate of success.

Security - Most security can be performed without calculus; however, many people who want to understand like to know the risk.

AI - The basics of AI can be utilized without calculus; however, calculating advanced behavior, swarm intelligence/hive minds, and complex values based decision making.

Medical calculations - Visualizing most health data requires calculus such as an EKG reading.

Science & Engineering - When working with nearly any other scientific discipline requires calculus: Aerospace, Astrology, Biology, Chemistry, or Engineering.

Many people in programming can go their entire career without using calculus; however, it can prove invaluable if you're willing to do the work. For me it has been most effective in automation, logistics, and visualization. By identifying specific patterns, you can simply ignore the pattern, imitate the pattern, or develop a superior method all together.

share|cite|improve this answer
    
How are cos, sine, $\pi$ and $\mathrm{e}$ calculus? – David Richerby 5 hours ago

The fact is that there's very little chance you'll ever use calculus. However, virtually every other scientific discipline DOES use calculus and you are working on a science degree. There are certain expectations of what a university science degree is supposed to mean and one of those things is that you know calculus. Even if you'll never use it.

It's okay if you do poorly in calculus, but make sure you put some effort into discrete mathematics. There are a lot of real-world programming problems where discrete math comes into play and ignorance of its principles can embarrass you in front of other coders.

share|cite|improve this answer
4  
Your first paragraph is completely wrong and bordering on conspiracy theory. There are plenty enough areas of computer science where calculus is useful (see the other answers for endless lists of them). Sure, it's possible to avoid all of those areas but it's very misleading to claim that dropping calculus will have zero impact beyond grades. – David Richerby 13 hours ago
1  
Depending on your degree program, you could complete a degree without ever using calculus, and I definitely think CS majors don't need as much of it as we get. But doing poorly in it will lock you out of some of the most interesting areas of computer science. There's plenty of time to be a web developer once you graduate; while in school, why not try to push yourself a little? – tsleyson 7 hours ago
    
@tsleyson If you want to be a web developer, save the tution money and time needed to obtain a CS degree. – Raphael 1 hour ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.