0
hi i need to do an integral in ++ but i need all the values to be positive, i do not want negative integrals help!!
help me?
7 Respuestas
+ 2
Simply create the program to take all the values and when doing integration, perform a check to validate all the values to be positive only.
Even if you fail, we help you out, but TRY FIRST.
+ 1
in a few words I need to solve integrals and return absolute value to me
+ 1
ok thanks bro let me see
+ 1
In programming or in mathematics?
0
Please elaborate your question!
0
I thought of some series like simpson's and calculate n numbers of rectangles under the curve
0
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(void){
int i,N;
float a,b,h;
float integral=0.0;
N=10;
a=0.0;
b=1.57079632679490; // = pi/2
h=(b-a)/N;
for (i = 0; i < N; ++i)
{
integral = integral + h*sin(a+h*i+h/2.0);
}
printf ("La integral de senx en el intervalo es %f \n", integral);
system ("pause");
return 0;
}
then brother what I'm looking for is to implement integrals with different intervals, and that their values are absolute, this is a simple idea and only calculates the integral of sen .. :o