<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/integration-functions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Integration functions"
}
-->

# Integration functions

Compute the running sum, Simpson, or trapezoidal integration of a vector.

## Topics

### Integration

[`static func integrate<U>(U, using: vDSP.IntegrationRule, stepSize: Double) -> [Double]`](/documentation/Accelerate/vDSP/integrate(_:using:stepSize:)-1bw3x)

Returns the integration of a double-precision vector using the specified rule.

[`static func integrate<U>(U, using: vDSP.IntegrationRule, stepSize: Float) -> [Float]`](/documentation/Accelerate/vDSP/integrate(_:using:stepSize:)-7wei4)

Returns the integration of a single-precision vector using the specified rule.

[`static func integrate<U, V>(U, using: vDSP.IntegrationRule, stepSize: Double, result: inout V)`](/documentation/Accelerate/vDSP/integrate(_:using:stepSize:result:)-75jvf)

Performs the integration of a double-precision using the specified rule.

[`static func integrate<U, V>(U, using: vDSP.IntegrationRule, stepSize: Float, result: inout V)`](/documentation/Accelerate/vDSP/integrate(_:using:stepSize:result:)-44lew)

Performs the integration of a single-precision using the specified rule.

[`enum IntegrationRule`](/documentation/Accelerate/vDSP/IntegrationRule)

Integration rules.

### Running Sum Integration

The functions in this group perform integration on the values in a vector.

[`extern void vDSP_vrsum(const float *__A, vDSP_Stride __IA, const float *__S, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vrsum)

Performs running sum integration over a single-precision vector.

[`extern void vDSP_vrsumD(const double *__A, vDSP_Stride __IA, const double *__S, double *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vrsumD)

Performs running sum integration over a double-precision vector.

### Simpson Integration

[`extern void vDSP_vsimps(const float *__A, vDSP_Stride __IA, const float *__B, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vsimps)

Performs Simpson integration over a single-precision vector.

[`extern void vDSP_vsimpsD(const double *__A, vDSP_Stride __IA, const double *__B, double *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vsimpsD)

Performs Simpson integration over a double-precision vector.

### Trapezoidal Integration

[`extern void vDSP_vtrapz(const float *__A, vDSP_Stride __IA, const float *__B, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vtrapz)

Performs trapezoidal integration over a single-precision vector.

[`extern void vDSP_vtrapzD(const double *__A, vDSP_Stride __IA, const double *__B, double *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vtrapzD)

Performs trapezoidal integration over a double-precision vector.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)