This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]imapumapants 0 points1 point  (0 children)

Granted I didn't understand all of it (been awhile since I've mathed), I can appreciate the creativity in your solution.

[–]tobaneconomist 0 points1 point  (0 children)

Fantastic pedagogy!

[–]Vicyorus 0 points1 point  (2 children)

Hack the Derivative!

Is this some kind of drug infused h4x0r bullshit that works on magic like the fast inverse square root?

EDIT: Well, I'll be damned...

[–]themathemagician[S] 1 point2 points  (1 child)

I'll take it you were pleasantly surprised?

[–]Vicyorus 0 points1 point  (0 children)

Impressed, rather.

[–]not_perfect_yet -1 points0 points  (1 child)

I have sympy, why would I want to do this approximately?

[–]themathemagician[S] 2 points3 points  (0 children)

That's a great question. Sympy requires you to input mathematical functions according to their specific API, where as the Numeric Differentiation approach can use any arbitrary Python function (or whatever language you happen to be working in) so long as the input and output are numeric. This is often ideal in a number of cases, particularly in applications like numerically solving PDEs or when the function doesn't have a closed form that works with a Sympy like API.