Questions tagged [calculus]

Calculus is the study of change of one or more variables with respect to another variable. Calculus has two main operators: differentiation and integration. Differentiation can be used to study the change of one variable with respect to another. Integration can be used to find the area bounded by a function.

Calculus plays an important role in computer science, for example, in the comparison of the performance of various algorithms and the complexity of various problems. These are often expressed using big O notation, which relies on the idea of the limits of ratios of functions as a variable tends to infinity.

On the practical programming side, there are several fields that will require calculus to a greater or lesser extent:

  • Numerical analysis and computation.
  • Signal processing (Image, video, audio, etc).
  • Data analysis and prediction for business applications.
  • Modeling of dynamical systems.
  • Machine learning.
  • Physics engines for video games.
580 questions
8
votes
2 answers

How to sort colors in two dimensions?

I am currently working on a hobby project to automatically solve a puzzle from the popular mobile game I Love Hue. The game is available here. Basically, the whole premise of the game is that you're given a bunch of colored rectangular blocks…
Garrett Gu
  • 91
  • 4
8
votes
1 answer

Is there a Calculus library for JavaScript?

Does anyone know of a Calculus library for JavaScript? I've done some Googling and haven't come up with anything. I applied for the WolframAlpha API, but that's expensive unless they choose to give me a grant. Ideally, I could feed an Array of 2d…
Zack Burt
  • 8,257
  • 10
  • 53
  • 81
7
votes
2 answers

Can SymPy recognize the derivative of a product?

In the program below, SymPy does not seem to understand that the integrand is the derivative of a product. Is there a way to make it return u*v? import sympy x = sympy.symbols('x', real=True) u = sympy.Function('u') v =…
Rastapopoulos
  • 487
  • 2
  • 18
7
votes
2 answers

Riemann sums are converging more quickly than higher-order polynomial approximations

I'm having some issues with the experimental results of my function implementations, and I would like others to verify that the functions that I'm using are logically sound. Context: For a certain programming/math problem, I need to calculate an…
Adam Gausmann
  • 302
  • 1
  • 10
7
votes
3 answers

Calculus? Need help solving for a time-dependent variable given some other variables

Long story short, I'm making a platform game. I'm not old enough to have taken Calculus yet, so I know not of derivatives or integrals, but I know of them. The desired behavior is for my character to automagically jump when there is a block to…
Zane Geiger
  • 277
  • 1
  • 3
  • 10
7
votes
2 answers

Books or Tutorials that explain Calculus from a programming perspective

K I'm a self taught programmer and been so for a couple of years. But in order to go beyond the programming scab work (entry lvl, Tester, Web Dev, Commercial App Dev; of which I am more than grateful for) and go beyond conventional programming gigs.…
Terrance
  • 11,764
  • 4
  • 54
  • 80
7
votes
1 answer

Solving a system of differential equations in R

I have a simple flux model in R. It boils down to two differential equations that model two state variables within the model, we'll call them A and B. They are calculated as simple difference equations of four component fluxes flux1-flux4, 5…
colin
  • 2,606
  • 4
  • 27
  • 57
7
votes
1 answer

Is complex differentiation of datatypes sensible?

pigworker once asked how to express that a type is infinitely differentiable. This question brought to mind the fact that in complex analysis, a function that is differentiable (on an open set) must be infinitely differentiable (on that set). Is…
dfeuer
  • 48,079
  • 5
  • 63
  • 167
7
votes
2 answers

Sympy summation with indexed variable

I try to create a sympy expression with a Sum with an indexed variable as previous explain here However, I can not do lambdify of this expression and give an array to get the sum calculated. Is this impossible?
Diogo Santos
  • 804
  • 2
  • 13
  • 26
6
votes
4 answers

javascript slider weighted values

I have a JavaScript slider that outputs a value between 0 and 1 depending on its position. I want to convert that value to a value on another scale between say 100 and 1000, but based on the distribution of a set of data points between 100 and…
Andy Hume
  • 40,474
  • 10
  • 47
  • 58
6
votes
2 answers

What is an "up" or "down" structure in Scheme?

Very early on in Functional Differential Geometry, Sussman & Wisdom start using an "up structure"... but I haven't the slightest idea what this could be. (print-expression ((compose P2-chi R2-chi-inverse) (up ’x0 ’y0))) I cannot find the…
1ijk
  • 1,417
  • 2
  • 19
  • 31
5
votes
3 answers

Calculating APR using Reg Z Appendix J

OK. I'm brand new to this site so "Hello All"! Well I've been wrestling with a difficult problem for the last week and I would appreciate any help you can give me. I know there are many formulas out there to calculate APR but I've tested many…
Dave Nesbitt
  • 51
  • 1
  • 2
5
votes
3 answers

Space Physics for missiles, spaceships - Learning Calculus edition

Supposing we have Missile A, with a position vector and velocity magnitude (ignoring acceleration, as many games do) and Spaceship B, with position and velocity vectors. Now, this missile, being a Nasty Missile of Seeking, will try to find the best…
Narf the Mouse
  • 1,541
  • 5
  • 18
  • 30
5
votes
2 answers

Big-O notation confusion

I have come across some of the difficulties during doing this question. The question is: sort the following functions by order of growth from slowest to fastest: 7n^3 − 10n, 4n^2, n, n^8621909, 3n, 2^(log log n), n log n, 6n log n, n!, 1.1^n And my…
Jinny
  • 83
  • 4
5
votes
3 answers

Implicit differentiation with Python 3?

How can we derivate a implicit equation in Python 3? Example x^2+y^2=25 differentiation is: dy/dx=-x/y, when try this: from sympy import * init_printing(use_unicode=True) x = symbols('x') y = Function('y')(x) eq = x**2+y**2-25 sol = diff(eq,…
Robby
  • 269
  • 4
  • 8
1
2
3
38 39