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

Query retrieving vs. calculus - best performance?

I have a doubt, is best, in term of performance, retrieving from a large database (50k+ rows growing) on MySQL a "calculated" data or perform the calculus on the fly? The calculus are simply division and multiplication of some data yet retrieved…
damoiser
  • 6,058
  • 3
  • 40
  • 66
0
votes
2 answers

Maximize Rectangle in an Area on the X, Y plane with a list of points representing the area

Okay, I need help maximizing the area of a rectangle in the sliver object that can be many different shapes. I've already done most of the work. I'm working in C# with a kinect and the depth pixels. This image is just the best representation of what…
Cheddar
  • 28
  • 5
0
votes
1 answer

Riemann Integrator Sum Issue

Here is my code for the Riemann Integrator: public class RiemannIntegrator { public static void main (String [] args) { double lower = Double.parseDouble(args[args.length -2]); double higher =…
user2162213
0
votes
5 answers

Calculate checksum in C#

numbers[i] = numbers[i] * 2; if (numbers[i] >= 10) { string t = numbers[i].ToString(); Console.WriteLine(t[0] + " plus " + t[1]+" = "+quersumme(t).ToString()); numbers[i] = Convert.ToInt32(t[0]) + Convert.ToInt32(t[1]); } public int…
Liam Schnell
  • 474
  • 8
  • 25
0
votes
2 answers

C# aggregation function for a non-linear series

I'm given two arrays, one representing a price, the other representing a number of units: e.g. decimal[] price = new decimal[] {1.65, 1.6, 1.55, 1.4, 1.3}; long[] quantity = new long[] {5000, 10000, 12000, 20000, 50000}; So the first 5000 units…
user250837
  • 81
  • 5
0
votes
1 answer

Numerical Integration Problems with Product Rule due to differnet resolution

I am facing some problem during calculation of Numerical Integration with two data set. For integration i am using simpsons 1/3 rule. function I = Simpsons(f,a,b,n) if numel(f)>1 % If the input provided is a vector n=numel(f)-1;…
salmannsu
  • 193
  • 1
  • 9
0
votes
2 answers

Mathematica Index Equation (basic algebra)

I am currently working on a Mathematica project to calculate Riemann's sums and put them in a table. I am having trouble printing the row numbers (intervals). (The row numbers are also parameters to the secondary functions). I don't know of any way…
Kelly King
  • 43
  • 1
  • 7
0
votes
1 answer

MATLAB Help. Plugging in matrix of variables into existing function

I have an existing function of two variables (x,y) called discriminant defined in the following way: discriminant = xSecondPart * ySecondPart - xySecondPart.^2; Where xSecondPart and ySecondPart are the second partial derivatives of a function f.…
Skyler
  • 2,834
  • 5
  • 22
  • 34
0
votes
2 answers

I want to reduce two modules into one. The first is an equation; the second takes the integral of this equation

Possible Duplicate: Merging two modules into one. The first is an equation; the second takes the integral of this equation #include #include double f(double x){ return (x*x); } double integrateF(double (function)(double)…
user1742525
  • 45
  • 1
  • 6
0
votes
1 answer

complexity theory-sorting algorithm

I'am taking a course in complexity theory,and so it's need some mathematical background which i have a problem,. so while i'am trying to do some practicing i stuck in the bellow example 1) for (i = 1; i < n; i++) { 2) SmallPos = i; 3) …
HATEM EL-AZAB
  • 331
  • 1
  • 3
  • 11
0
votes
3 answers

Which program to solve integration = 0 for a variable?

i'd like to know how to solve a definite integral in Mathematica. I do know all variables except b, and need to solve for F(b)=0. How can i solve it in Mathematica? Here is my try: NSolve[Integrate[1/(8*(1 - ff) (2 Pi)^0.5) E^(-0.5*((x - 1.1)/(1…
0
votes
1 answer

Calculate new position values in C#

I have a document which containing some elements. The document is an INDD document. I am trying to show it in a webview but in a smaller size than the original size. I am using ImageMapper (ASP.NET) to mark the different elements in the webview.…
0
votes
1 answer

Objc math decimal

I have an interesting situatin to solve, its more like a quiz :) I have to recreate a simple calculator and I have two buttons with up/down on it. The function of this two buttons are simpe, they take the current value and it sums 1 or take 1. So I…
DigitalVanilla
  • 214
  • 2
  • 12
0
votes
1 answer

harmonic series with x86-64 assembly

Trying to compute a harmonic series. Right now I'm entering the number I want the addition to go up to. When I enter a small number like 1.2, the program just stops, doesn't crash, it seems to be doing calculations. BUt it never finishes the…
user1050632
  • 680
  • 4
  • 13
  • 26
-1
votes
1 answer

TypeError for derivative function

I used sympy to find derivative of a function. ()=−5+√(4−^2) import sympy def f_derivative(x): x = sympy.Symbol('x') f = x - 5 + (4 - x**2)**0.5 derivative_f = f.diff(x) derivative_f = sympy.lambdify(x, derivative_f) …
Phung Doan
  • 25
  • 4