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

Why my integral is not displaying bigger with react-better-mathjax?

I'm using react-better-mathjax and when i display integrals, it is not displaying as it should. As-to-say bigger.... It displays this : Instead of that : Here is the code : var mj = "\\(V_{\\frac{1}{2}sphere(h)} = \\int_0^R \\pi(R^2 - h^2) dh…
jozinho22
  • 459
  • 2
  • 7
  • 24
-1
votes
1 answer

Range bounds of type Integral and/or RealFrac causing problems in nested list comprehensions

I'm trying to understand why for otherwise simple expressions, range bounds specified in Integral types cause ghc to reject a nested comprehension, when changing the range bounds to Num allows the same comprehension to execute successfully. For the…
spillner
  • 340
  • 1
  • 5
-1
votes
1 answer

Scilab - multidimensional integrate

Do you have any idea how to define multidimensional integral? I have to use my own method (Monte-Carlo) to figure out the result. Integral Ω - disc where r=0.5 and its center at x=0.5, y=0.5
-1
votes
1 answer

Calculate variable value inside integral

I'm trying to calculate the blackbody spectral radiance using planck function: import numpy as np import matplotlib.pyplot as plt from scipy import interpolate, integrate # Physical constants: h = 6.6260693e-34 c = 299792485.0 …
c3dr1c
  • 1
-1
votes
1 answer

Why definite integral of undefined function returns unevaluated?

Why can Maple yield the result of int(q(t)*diff(q(t),t),t) = (q(t)^2)/2 (indefinite integral) but with int(q(t)*diff(q(t),t),t=0..t) (definite integral) it returns unevaluated? I expect the result of the definite integral to be (q(t)^2 - q(0)^2)/2.
brunoleos
  • 1
  • 1
-1
votes
1 answer

Matlab gives no result when I use the integral function

When trying to calculate the Integral of two variables, I got nothing! Here is the code: syms x; a=0.4; theta=(9 - 4*x*(5*x - 141/25))^(1/2)/2 - 3/2; theta_prime=-(40*x - 564/25)/(4*(9 - 4*x*(5*x -…
-1
votes
1 answer

iterate over a list by pre-defined steps

How to iterate over a list with defined steps and not in each item in the list? I want to be able to jump some items. t = np.linspace(0,100,1000) Fs = 6000 f = 200 func = 50*np.sin(2 * np.pi * f * t / Fs)+50 idx = [9 140 309 439 609 739 908] for i…
user10497058
-1
votes
1 answer

Integral calculation with parameters and age dependents

I have a working function of an integral that I would like to expand. I want to consider different parameters dependent on age. param_1938 for ages >=76 param_1945 for ages 66 to75 param_1955 for ages 61 to 65 The working function that I would…
Orongo
  • 285
  • 1
  • 6
  • 16
-1
votes
1 answer

definite 4D integration in octave, with functions as limits

I need to do 4D integration in octave. My function is f(x,y,phi,theta) and some of the integration limits are function of the outer limits. 0 < theta < pi t1(x,y) < phi < t2(x,y) h1 < y < h2 w1 < x < w2 I wrote in octave like this…
Codelearner777
  • 313
  • 3
  • 15
-1
votes
1 answer

Definite, improper and multiple integration?

I have a question, whether is it possible in R to implement the Excel "search of the decision function"? It is necessary to create a script in R to solve an integral equation. To solve 4 integrals below manually I just need paper, a pencil and 10…
psysky
  • 3,037
  • 5
  • 28
  • 64
-1
votes
2 answers

Direved and integral problème [SCILAB]

I'm working on a project that calculates the derivative of the speed and the integral of the acceleration. my problem is that I have a lot of acceleration points and speed over time and I can not find the right program for that. example:…
-1
votes
1 answer

Nested call to integral fails

Try this piece of code, which works fine. a=1;b=2; % A two-variate function f2= @(x,y) x+y; derivedF2=@(x) integral(@(y) f2(x,y), a,b); % Test the evaluation of the derived function handle derivedF2(0); % Test the integration of the derived…
user2008151314
  • 680
  • 6
  • 10
-1
votes
1 answer

ValueError when using scipy.integrate.quad

I am receiving a ValueError when integrating using scipy.integrate.quad. Here is my simplified code: import numpy as np import scipy.integrate as integrate p = np.arange(0,1,1/1000) h = lambda p: p**2/2+p*(1-p) Kl = lambda p: h(p) + 0.02 K = Kl(p) R…
splinter
  • 3,727
  • 8
  • 37
  • 82
-1
votes
1 answer

How to get errors from PID?

Need to add PID controller. Can you help me how to get error, integration error and derivative error from PID? I need this values to generate PID parameters by genetic alghorithm. J = 0.01; b = 0.1; K = 0.01; R = 1; L = 0.5; A = [-b/J K/J …
Masaj
  • 217
  • 3
  • 14
-1
votes
1 answer

How to perform indefinite integration of this function in MATLAB?

I need to perform the following operations as shown in the image. I need to calculate the value of function H for different inputs(x) using MATLAB. I am giving the following command from Symbolic Math Toolbox syms y t…