Hacker News new | past | comments | ask | show | jobs | submit login
Calculus with Julia (calculuswithjulia.github.io)
312 points by adamnemecek 9 days ago | hide | past | web | favorite | 27 comments

I loved working through Ken Iverson's, the creator of APL, books in J: "Calculus", "Algebra", and the "Concrete Math Companion" (a companion Knuth and Patashnik's book "Concrete Math" in J)[1].

I also like the Physics and Math in SICM (Structure and Interptretation of Classical Mechanics), and Scheme maps well to math equations, at least for me [2].

Julia does follow the way math is written, but I prefer Haskell. The book "The Haskell Road to Logic, Math and Programming" [3] is great, and this article on Geometric Algebra (GA) in Haskell is excellent [4].

[1] https://www.jsoftware.com/books/pdf/

[2] https://mitpress.mit.edu/sites/default/files/titles/content/...

[3] https://www.amazon.com/Haskell-Logic-Programming-Second-Comp...

[4] https://crypto.stanford.edu/~blynn/haskell/ga.html

I would love to see the sections annotated with "approximately twenty minutesb to read" (like Medium does). In fact, if Google added this to every link, that would be amazing. I'm always excited to book mark things like this, and then when I visit my bookmarks tell myself "I'll read this when I have more focused time". Inside my head I'm assuming it'll be hours of work and I never find or make that time, and as such, never read those articles. This looks great and I bet I'll never make the time because of my mistaken assumptions.

Firefox has that feature for every page that can be given a reader mode/view.

I've been thinking of making a kind of bookmarks manager that automatically adds time information. Ideally it would also support things like podcasts or videos. Then, when you have x amount of extra time, you could see find something to do easily.

That actually sounds great

This is good, looks like something I might read this summer.

Small question though: are infinite series and Taylor polynomials not part of calculus? I don't see them here.

Thanks! I guess I missed it.

Strictly speaking they aren't a "part of calculus" - they aren't directly related to continuous rates of change - but that's a pretty arbitrary distinction and both are almost always taught as part of a calculus course.

Stewart defines calculus as the study of limits, which include infinite series.

In my opinion a more all-encompassing (if also more obtuse) definition would be: Calculus is the study of completeness.

I rather like this phrasing because basically everything you'll learn in calculus is a consequence of the completeness property of the reals.

How would you define and reason about integration without infinite series? Genuinely curious if someone has tried to do that.

For many people, integration is defined as "the area under the curve" and computed using sets of known rules. Infinite series are a tool we use to reason about calculus concepts more formally. It's a very arbitrary distinction; I was only making it because if you aren't studying calculus in depth you can avoid talking about Taylor polynomials and infinite series, but you can't really avoid talking about derivatives and integrals. If you want to define integrals formally, then you will definitely see infinite series.

Although there are a few ways to define the reals, one way is to define it as the limit of an infinite rational series.

A good def for the R. integral is: the one number which is both a lower bound of the set of all upper sums (area with superscribed rectangles), and an upper bound of all lower sums (inscribed rects).

That has a lot of nice properties which are useful in proofs, whereas the limit of sums definition suffers from there being too many ways for "delta x goes to 0" which need to be shown to be equivalent at some point to be useful (nasty!).

I'm pretty sure that's not possible, since the integral is defined as a limit of Riemann sum.

There are actually a number of different ways to define integrals - see https://en.m.wikipedia.org/wiki/Integral#Formal_definitions

It's usually not really defined as the limit of a series in analysis texts, but as the simultaneous greatest lower bound and least upper bound of upper and lower sums (inscribed and circumscribed rects area), respectively. THat def is a lot easier to deal with in proofs and just as intuitive to many.

People interested in this should really check out TaloySeries.jl. It's a pretty awesome tool for playing around with a lot of calculus concepts in Julia.



Why are they writing every program name in code formatting?

I do that pretty often as well, mostly because backticks looks better in plaintext than asterisks, and the text ends up looking more 'programmatic' than bold (italics/underlines are pathetic, and I rarely consider them as emphasis options).

It's also very rare for inline code to be useful (versus multiline), so the backtick is generally wasted in markdown anyways.

But why use special formatting at all? Just capitalize the name.

Is there a tutorial like this but based on Python or R?

Julia's syntax is sufficiently similar to Python/R/Matlab that it should be pretty easy to read (but might have to look up a few things) even if you've never used Julia

I like julia better than either of the two. It also has insane interop with both of those so like any numpy and R functions are a line away.


I remember trying out Julia for the first time. There weren't many libs but I found out about @pyimport and I was like "cool, let's try some stuff" and I found out that pretty much all I wrote was calls through Python bindings, so I thought "wait it's probably simpler to just use Python then", and left it at that.

Point is, I hope the ecosystem has gotten better last time I tried it ~3 years ago, and I also hope the interoperability didn't turn out to be "too good" for the ecosystem's own health.

The ecosystem is pretty amazing.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact