Integrating a function with Arduino

Hello,

I would like to integrate a function using Arduino. Is my example code good?

float t, t_0;

void setup(){

}
void loop(){
  t = millis();
float x_dot = 5;
float x = x_dot(t-t_0)*0.001 + x_0;

x_0 = x;

};

Thanks

You are trying to use x_dot as a function but it is a float variable.

What is the code supposed to do ?

Take a look at this Wikipedia page:

Try to understand the principle before converting it to C/C++ code.

Pieter