Questions tagged [integral]

This tag should be used for questions related to coding solutions for integrals.

In numerical analysis field, algorithms for integration are a typical example of use for this tag. See also:

819 questions
0
votes
3 answers

Calculating Integrals: One-liner solution?

I was working on a program to find the integral of a function, where the user specifies the amount of rectangles, the start, and the stop. NOTE: I am using left-end points of the rectangles. I have the function working perfectly (at least, it seems…
Rushy Panchal
  • 16,979
  • 16
  • 61
  • 94
0
votes
1 answer

Explanation of two integral equations and implementation

I have a problem with these two equations showing in the pictures. I have two vectors represented the C(m) and S(m) in the two equations. I am trying to implement these equations in Matlab. Instead of doing a continuous integral operation, I…
Samo Jerom
  • 2,361
  • 7
  • 32
  • 38
0
votes
1 answer

Handle function implicitly accounting for independent variables

I have that clc, clear all, close all tic k1 = 1E-02:0.1:1E+02; k2 = 1E-02:0.1:1E+02; k3 = 1E-02:0.1:1E+02; k = sqrt(k1.^2+k2.^2+k3.^2); c = 1.476; gamma = 3.9; colors = {'b'}; Ek = (1.453*k.^4)./((1 + k.^2).^(17/6)); E = @(k) (1.453*k.^4)./((1 +…
fpe
  • 2,700
  • 2
  • 23
  • 47
0
votes
0 answers

Numerical integration of numerical function in R

I'm, trying to apply this solution to find the p-value in an arbitrary distribution defined from data experiments. I have estimated this distribution using the density function in R. Now, I would like to integrate this function to apply the solution…
Pythonist
  • 1,937
  • 1
  • 14
  • 25
0
votes
2 answers

error using 'quad' function in matlab - integrating power to get energy

I am calculating capacitor voltage and current. Now I want to determine the energy also. Energy is just the integral of power, however I cannot integrate my power…
user1412994
  • 35
  • 1
  • 2
  • 9
0
votes
1 answer

IntelliSense: expression must have integral or enum type

Guys i need someone fix this problem ? when i compile that code i have this error: Error: IntelliSense: expression must have integral or enum type i have problem in this part: Console(0, V("seta sv_hostname " + servername + ";\n")); so how i can…
user1743737
  • 45
  • 1
  • 3
  • 5
0
votes
1 answer

What is the fastest way to interpolate an Integral in Java?

I have a lot of datapoints and I want to compute the area under the curve for sliding windows. But It should be quite fast. I googled a bit and found a NewtonCotes implementation in Java, but I don´t know if there are faster methods. Any Ideas?
Puckl
  • 731
  • 5
  • 19
0
votes
0 answers

nested quadrature in matlab using two quadrature rules

Stuck on numerically evaluating this integral and only have experience in doing simple quadrature schemes so bear with me if this looks amateurish. The nested integral is below using Gauss-Hermite(-inf,+inf) and a variant of Gauss Laguerre scheme…
RVNorman
  • 123
  • 1
  • 8
0
votes
1 answer

achartengine - taking an integral?

I'm using achartengine to display real-time data. Does anyone know if it's possible to take an integral of the graph displayed by using some nice methods of achartengine? Or do I have to resort to my approximations with rectangles? Thanks in…
Nebel22
  • 478
  • 8
  • 17
0
votes
1 answer

Recursively and iteratively calculating integrals in Scheme

I'm trying to create both recursive and iterative functions for integration in Scheme. So far, I haven't succeeded. How can I calculate integrals in Scheme?
hello
  • 9
  • 1
0
votes
1 answer

MATLAB Integration Situation

I want to evaluate the integral of this function : (cos(t^2)*sin(t)^2)^(1/2) over the period -15*pi:50*pi I am using these : f=@(t) (cos(t.^2).*sin(t).^2).^(1/2); quad(f,-15*pi,50*pi) But i am getting warned: Warning: Maximum function count…
Murat Şeker
  • 1,651
  • 1
  • 16
  • 29
-1
votes
1 answer

How to define limits of integration for a triple integral in SciPy using tplquad?

I cannot understand how to approach defining the limits of integration for a triple integral in Scipy with the tplquad function. I am using the book Learning Scientific Programming With Python By Christian Hill and trying to solve problem…
ty_743
  • 1
-1
votes
1 answer

C++ Complex number expression for integrating

I'm trying to implement Monte-Carlo method to solve an integral and can't figure an approximation for my function. double function(double x) { std::complex fz = (pow(-7 * pow(x, 4) - 3 * x + 11, 1.0/3.0) / pow(-2 * pow(x, 6) - 14 * x -…
Suspense
  • 85
  • 1
  • 1
  • 9
-1
votes
1 answer

How to do numerical aproximation of integral in Sympy

I'm new using Sympy, and people told me that I would be able to perform numerical approximations of integral with Sympy. What I have tried is this: import numpy as np from sympy.abc import x import matplotlib.pyplot as plt from sympy import…
nosumable
  • 53
  • 1
  • 6
-1
votes
1 answer

SQL QUERY for time totalisation calculation

This is an example of dataset: . I am looking for an SQL query that calculates the integral of the curve defined by the example data. Since the value of the curve is a boolean (0-1), calculating the integral using seconds would also result in the…