Trouble understanding math proofs *edit Even though there are already answers to my question, I appreciate anyone that offers their advice!
I am not sure if this is the right place to ask this but I usually ask for help here. I am a computer science major currently taking a calculus 2 class. I am able to do the problems presented in class from looking at examples of similar problems and understand concepts presented. But when it comes to sitting down with the textbook and reading various proofs I have a very hard time understanding them. I have spent hours searching online for different explanations on a particular proof and still do not fully understand it. I have also asked about this proof on this website. I know I can pass Calculus 2 without understanding the proofs but part of me wants to know why this works and how.
Are math proofs important in Computer Science?
After spending hours trying to understand a proof without success, what am I doing wrong? Can anyone offer any advice?
 A: Yes, proofs are absolutely important in computer science. They are of integral importance in topics of theoretical computer science - mathematical logic, graph theory, automata theory, computability theory, complexity theory, etc.
They are also important, though less directly, in your more 'applied' or practical CS: techniques for proving theorems and the structured, logically rigorous thinking that comes with practice in proving theorems is going to be very beneficial for your ability to examine your code, and 'prove' that it works.
Moreover, even if you're not so interested in theoretical CS, if you wish to become a truly good programmer, you will need to know math at the level of fairly complicated proofs. At the very minimum, you will need a good understanding of algorithms and complexity theory, the study of which is quite heavy in proving theorems.
The good thing is that Calculus 2 is not really an introduction to proof-based mathematics. Your performance in Calculus 2 should not intimidate you with regard to your career as a programmer. You may have encountered epsilon-delta proofs. They are confusing, and in my experience, not a very good introduction to proofs at all. You should take some introductory classes to real analysis and linear algebra to really get exposed to proof-based mathematics, and you should read Daniel Velleman's How to Prove It to get acquainted with reading and writing proofs.
A: I do both computer science and math and feel that computer science is vastly improved with an understanding of proofs. For the theory more than the programming. Calculus proofs may be useful in an algorithms class when trying to prove the big O of algorithms.
If you want to learn how to write proofs, pick up a copy of How to Prove It
That book is great for learning how proofs are constructed. 
A: First, calculus courses are typically not very rigorous. You may be more satisfied with the notion of proof once you get into a class on discrete mathematics or perhaps linear algebra.
Proof is very important in computer science. In the area of compiler and language design, proofs are the lifeblood of the field. A bad proof in either will result in a faulty optimization, which could break software written years and years later in ways that are nearly impossible to track down.
In general programming, you don't typically write out proofs explicitly, but the same rigorous approach to reasoning is extremely important. Whenever you track down a sporadically occurring bug, for example, you have to do a case analysis:
"At this point in the code, either x < length or y < length and x = length, or else maybe the hit_exception flag has been set, in which case..."
Nine times out of ten, bugs occur because some programmer made a slight error in case analysis. A simple example might be "either x >= 0 or x <= 0"... but those cases aren't disjoint(!) and what the program actually does in the case x = 0 is not entirely clear. Or perhaps the problem is you look assume "x > 0 or x < 0" and you miss a case.
It should go without saying, proof is paramount in cryptography and computer security. An erroneous proof is to mathematics what a backdoor is to a program.
That said, proofs are hard. The language of logic is not quite the same as the language we speak everyday, (even when we claim to be speaking logically!). If you have any specific questions, every kind of introductory-level proof tends to have a small set of pitfalls beginners typically fall into. Ask a specific question, and you'll get a pointed answer.
A: Such help as you ask is available in the section of my website devoted to practice in proving theorems.
