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
0
votes
1 answer

Having trouble with this python error

Hey guys I am trying to solve this math problem Using data in a car magazine, we constructed the mathematical model y=100e^(-0.0482t) for the percentage of cars of a certain type still on the road after t years. Using Python, determine the rate of…
drdrew
  • 61
  • 2
  • 5
0
votes
0 answers

Using functions to find the Solutions to equations in c++

Thanks in advance for everyone's help. I'm trying to write a program in c++ that includes a function that calculates all possible combinations of f1, f2, f3; where 15 = f_total = ((f1) / (f1+f2+F3)). Whenever true, the program will output the…
0
votes
1 answer

Creating a Simple Riemann Sum Calculator in Java

I'm trying to make a calculator that produces the left hand riemann sum for the equation y = x - x^2, from the bounds 0 to 2. The problem is, I keep getting 0.0 for all my solutions. If anyone could tell me what I'm doing wrong, that would much…
user3512387
  • 69
  • 1
  • 1
  • 6
0
votes
0 answers

LibGDX CatmullRomSpline Derivative Meaning?

When calling the derivative method on the CatmullRomSpline, what exactly does this value represent? It’s been a while since calculus, but if my memory serves me correctly taking the derivative of the position with respect to time gives you the…
Tekkerue
  • 1,497
  • 1
  • 11
  • 17
0
votes
1 answer

Find area between the curve y = 1/(1+x^2) and the x-axis

Find area between the curve y = 1/(1+x^2) and the x-axis. This is Calculus 2. I think I have a and b correct, but not sure of c. Any help would be very much appreciated! :) (a) from -10 to 10 Answer that I got: arctan(10)-arctan(-10) = 2.942 (b)…
0
votes
0 answers

Implementing this vector calculus equation?

I am trying to implement the following vector calculus equation in MATLAB. Here n, u, v etc are 2D matrix of size 201 X 201 and others like mu and chi are respective functions. There are few doubts which comes to my mind now. gradient command…
Devanand T
  • 63
  • 5
0
votes
1 answer

How to solve integral in Matlab having an upper limit set as the sine function?

I am getting error in executing the code below for calculating one simple integral in matlab. The code is given below. %Parameter…
AK K Khan
  • 41
  • 7
0
votes
1 answer

Drawing polygons using random points?

I am trying to generate a set of points that I will connect to make polygon. The data has to be generated in a systematic way. I am trying to generate the point set by randomly deriving radial coordinate r and evenly incrementing angular coordinate…
Pete
  • 754
  • 2
  • 13
  • 27
0
votes
1 answer

User inputed f(x) usable in swift

I'm working on some calculus functions in swift. The main barrier I have to all of them is taking some kind of user input system and being able to use that in the function. For example, if I can translate what the user inputs into a swift acceptable…
modesitt
  • 7,052
  • 2
  • 34
  • 64
0
votes
1 answer

discrete derivative of function

I have the following MWE that calculates the derivative of a function along the y-direction: x=1:50; y=x; phi = sin((x-10)/10); dyPhi = (4.0*(circshift(phi(:,:), [+0, +1]) - circshift(phi(:,:), [+0, -1])) + ... 1.0*(circshift(phi(:,:),…
BillyJean
  • 1,537
  • 1
  • 22
  • 39
0
votes
1 answer

How do i convert from center origin to bottom origin?

I will start by apologizing I highly doubt I will have any of the correct terminology, unfortenately after a few hours of raw testing and mashing my head against the wall I can figure this out. I working with an engine the orients its models using a…
0
votes
0 answers

calculate 2 points on an outer circle based on 2 points on an inner circle where the 2 sets of points are horizontal

Observing the diagram through the link below, where the 2 circles have the same center point: http://www.graphicsgen.com/CircleQuestion.png given the center point (X1,Y1), any radius S, and degrees D and E, it is easy to calculate Points (X2,Y2) and…
Jralford
  • 211
  • 3
  • 6
0
votes
1 answer

Calculate "Memory Game's" score, based on the number of attempts, time spent and cards left

I'm developing the memory game in javascript (based on this tutorial: http://www.developphp.com/view.php?tid=1393 ), and now i need to calculate a fair score, based on these conditions: - The game consists of 4x4 cards (that means there are 16…
I-NOZex
  • 25
  • 3
  • 20
0
votes
0 answers

Error in plotting graphs with discontinuities in Java?

I am trying to create a graphing calculator applet using Java. I am having trouble plotting graphs that contain discontinuities such as holes and asymptotes. Here is the code I have for graphs with asymptotes so far: for (int i = 1; i < size; i++) {…
nithinaray
  • 11
  • 3
0
votes
1 answer

Integrating over a matrix of points

I have a matrix of points F(x,y) = z, but I have no expression for F(x,y). x is from [0-2pi] and y is from [0-pi]. For each pair of "coordinates", I have a value of z. I would like to perform a double integration from 0-2pi and 0-pi of F. Can I do…
mr-santos
  • 73
  • 8