Derivatives and Integrals for iOS

Discussion in 'iOS Programming' started by man2manno, Jul 6, 2014.

  1. man2manno macrumors member

    Mar 21, 2009
    Hey guys,

    I haven't had a whole lot of time to research this so something might exist, but I was wondering if anyone ever had any luck performing derivative and integral operations in an iOS app?

    Let's say taking the derivative of some variable with respect to time, time will need to be stored in some array (I am assuming this is the best way).

    Anyone try anything like this?

  2. AxoNeuron macrumors 65816


    Apr 22, 2012
    The Left Coast
    It would be a relatively complicated task if you wanted to create an app that could take the derivative of any (differentiable) expression. Possible, but difficult. But if you're talking about taking the derivative of values only in a specific form such as f(x)=a^x+c, then it would be very easy. You wouldn't need to create an array, just separate the three variables and build if-statements to perform the logic of Newton's rules of differentiation.
  3. firewood macrumors 604

    Jul 29, 2003
    Silicon Valley
    For symbolic differentiation, look into a C port of macsyma. Might be too big for iOS. For derivative of data, most college textbooks on numerical methods will have several chapters on the subject.
  4. ChrisA macrumors G4

    Jan 5, 2006
    Redondo Beach, California
    Look in any "numerical methods" book. It's dead easy. You use Simpson's rule for integral and you can always get the slope from Y(n) - Y(n+1)

    You would only need to store the time of each sample if samples where not taken at fixed time intervals (such at 48,000 per second or whatever)

Share This Page