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
-2
votes
1 answer

solution for integral of x/(x-6)dx

I was trying to solve this integral x/(x-6)dx and I used substitution. u = x-6 and x = u+6. In the end, I ended up with the answer x+6ln|x-6|-6+C, however, the answer is x+6ln|x-6|+C without the -6. Can someone help me understand why this is the…
-2
votes
1 answer

Need help making a sum calculation faster in python

Here is a piece of my code with the summation. It includes an integral. all the variables peppered in there have float or integer values. import numpy as np import math import scipy.integrate from mpmath import nsum, inf sum1 = nsum(lambda m:…
user3006887
  • 71
  • 1
  • 8
-2
votes
1 answer

How to approximate the solution to a double integral in R using hit and miss and Halton?

I have the following question: what I do is: set.seed(1) N = 10000 f = function(x,y) x^y * y^x then I don't know how to proceed. Can somebody please explain to me how to do this? thanks!
-2
votes
1 answer

calculating the area under a LineChart (integral) in javafx

i am searching for any API that can be used for calculating the amount of area under a LineChart in JAVAFX. Do you know any?
omidXxX
  • 147
  • 1
  • 1
  • 9
-2
votes
1 answer

Integral Calculator wont work when given formula given more than 1 x in the formula

So I'm working on an integral calculator right now, and it works fairly well, although as soon as defining y as x**2+x*2+2 it stops working. What prompts my program to work with y = x**2+2 but not with y = x**2+x*2+2? import math as math x0 = 0 …
Meh
  • 3
  • 2
-2
votes
1 answer

C++: Using boost to calculate simple definite integrals

Anyone know how to use Boost to solve simple definite integrals? E.g. -x^2 + 1 from -1 to 1? I have tried reading the boost documentation, but I can't seem to figure out how to properly pass the function. Thanks Edit: My attempt so far using…
storluffarn
  • 121
  • 2
  • 11
-2
votes
2 answers

How to integrate over a triangle in MATLAB?

let's consider a two dimensional fonction f(x,y) and tree points A,B,C with ABC a triangle and i want to integrate the function f over the triangle ABC, is there a way to do that in matlab? thank you.
user3870075
  • 141
  • 1
  • 3
  • 10
-2
votes
2 answers

error: size in array new must have integral type [-fpermissive]

I'm using dynamic memory allocation to create new objects and the following error keeps showing up when I try to compile. I have dimensions_ created as an unsigned int so I'm not sure why this error shows up. EuclideanVector.h:69:40: error: size in…
-2
votes
2 answers

Computing integral with the Trapezoidal Rule (the approximate value of the integral, and the number of iterations)

The program needs to compute define integral with a predetermined accuracy (eps) with the Trapezoidal Rule and my function needs to return: 1.the approximate value of the integral. 2.the number of iterations. My code: from math import * def…
-2
votes
1 answer

Integral of a sign function proof

Can anyone please prove this expression below? I saw this in a paper and trying to see where it is coming from. integral(sign(A*w*cos(w*t+phi))*cos(w*t), t, 0, 2*pi/w) = 4/pi*cos(phi)
Baha
  • 33
  • 4
-2
votes
1 answer

numerical double integral function handle

power = 2; sigma=0.1; a = 1 /(sigma*sqrt(2*pi)); c= (sigma^2)*2; syms x y f = exp(-(x.^power)./c); dfdx = diff(f,x); c1 = diff(dfdx,x); f = exp(-(y.^power)./c); dfdy = diff(f,y); c2 = diff(dfdy,y); meancurvature = (c1 + c2)./…
-2
votes
1 answer

Numerical Double Integration in Java

I have to implement a numerical computation of double integrals in Java. Concentrating on the integrate() function, here's what I have to far: public static double Integrate(Integravel integrando, boolean pontoMedio) { double sum = 0.0; …
yves
  • 29
  • 7
-2
votes
2 answers

Matlab and integrals calculation

Can someone help me and tell what is the problem? I have to calculate some integrals and I keep getting this errors. Example: quad('(x.^3)*(sqr.((x.^4)+1))',1,8) ??? Error using ==> inline.subsref at 14 Not enough inputs to inline function. Error…
cleveroid
  • 1
  • 2
-3
votes
1 answer

Integration of arcsin problem using python

[Integration using python][1] $\int_0^{\infinity}\frac{sin^{-1}\left(2x\right)}{1+x^2}dx$ integration of (arcsin(2x))/(1+x^2) dx [infinity, 0] I can't seem to solve this problem using python. Can anyone help me with the solution?
Knight
  • 1
  • 1
-3
votes
1 answer

VB.Net TextBox Equation Reader

I try to make a program to calculate integrals. I want to read the equation from a textbox and i don't know how to store it. For example i write in the textbox : 3x^2+2x+1. How can i make some arrays to store every member of that equation and to…
Cata
  • 3
  • 5
1 2 3
54
55