63 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
80
views
Can't make a Simpson rule algorithm working in C++: works for some functions and some numbers, but not for others. Tried multiple methods to no avail
I was trying to make a little c++ program that integrates using the Simpson rule, but while I was testing I found out that it only works for some functions and some intervals. For example it works for ...
0
votes
0
answers
355
views
Using simps in scipy for py-feat
I am trying to use py-feat, a Python app.
Trying to run it gives an error that simps cannot be imported from Scipy.
Starting with scipy 1.6, simps got changed into simpson (the latest version of scipy ...
0
votes
0
answers
164
views
scipy.integrate.simpson gives different result when x (sampled points) is explicitly given
I was writing a simple integration function using Simpson's rule and was comparing my result to both an analytic result as well as the result from scipy's simpson function (scipy.integrate.simpson). I ...
0
votes
1
answer
81
views
Summing data based on specific series of numbers in data set
To preface, i am a total newbie at excel and am just learning everything.
I am applying simpsons rule to a data set, and have the rule automatically update and change spacings and location based on ...
0
votes
1
answer
371
views
How do I use nested integral functions to find a double integral in fortran?
I am trying to find the volume under a shape defined by h(x,y)
I have the following function which uses the Simpson Rule to integrate a one-dimensional function
!---------------------------------------...
0
votes
1
answer
193
views
Why cant I find the sin of a function with arange in python (jupyter notebook)
Hey!
I'm trying to solve an integration question but I keep on getting a long error.
from numpy import *
from sympy import *
from scipy.integrate import simps
a = 0 #bottom bound
b = pi/2 #upper bound
...
0
votes
2
answers
557
views
I receive three different warnings in scipy integration in python
I have the code structure below. I would like to get some numerical results here.
import numpy as np
import scipy
from scipy import integrate
alpha = .99
t = np.linspace(0, .85, 5)
s = np.empty_like(...
2
votes
3
answers
415
views
Trying to use Simpson's Law in Python
I am trying to write a program about Simpson's Law.What I am trying to do is use as error as shown in this picture:
.
In the code i write the Ih is my f1 and Ih/2 is my f2.If the error doesnt happen ...
1
vote
1
answer
810
views
Scipy Simpson integration of a positive quantity comes out negative
The following numerical integration of y values that are positive evaluates to a negative integration value using the builtin provided Simpson integration method of Scipy. This is much to my surprise. ...
0
votes
1
answer
96
views
Why is my Simpson's modelling not giving the correct answer?
I've been trying to do some Simpson's modelling to approximate integrals and although my code runs fine, it doesn't seem to give the correct answer. I'm new-ish to coding so I understand it's probably ...
1
vote
1
answer
307
views
Сonvert the coefficients of the Hermite polynomial into a function
I want to make a function from the output of Matlab Hermite function (for example, if we had an output from Hermite function [8 0 -12 0] it would be 8x^3 - 12x polynomial) and then integrate this ...
0
votes
1
answer
424
views
Numpy product of a vector and it's transpose
I have a N x N complex NumPy array U_0 and I have to do manipulation with it :
First, how can I increase the array with zero efficiently ? I can simply copy it into an np.zeros((2N-1, 2N-1)) but ...
0
votes
1
answer
215
views
Error Simpson's rule for polynomial not equal to 0
I implemented Simpson's rule in Python and tested the error for a cubic polynomial. The error bound of Simpson's rule states that it should be equal to 0, but it is not. Does anybody know why?
def ...
0
votes
1
answer
1k
views
Double integral Simpsons rule in python where the limits are functions
I have created a function where it can solve double integrals using the Simpsons rule but it only works when the limits of integration are constants
def double_integration(a,b,y1,y2,f,n):
### ...
0
votes
1
answer
383
views
Integrating data from txt file in python
I have three columns of data (time (t), Thrust (T), distance (s)) from which I would like to calculate the work performed. The text (logdata.txt) file containing the data is structured as follows:
...