(Trapezoidal) Rule
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/TechnoGamer16
πŸ“…︎ Jan 21 2022
🚨︎ report
Trapezoidal Rule
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/Tnerd15
πŸ“…︎ Dec 09 2021
🚨︎ report
Trapezoidal Rule Error Bond proof and Rolle's theorem

Here :

https://www.macmillanlearning.com/studentresources/highschool/mathematics/rogawskiapet2e/additional_proofs/error_bounds_proof_for_numerical_integration.pdf

At page 5, he suddenly starts to use a function G.

Where does come that new function of "G(x) = f (x) βˆ’ S(x) βˆ’ q(x βˆ’ x jβˆ’1)(x βˆ’ x j ) " ?

What's the relationship of G(x) to f(x) and S(x) ?

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/trogne
πŸ“…︎ Jan 16 2022
🚨︎ report
trying to program the trapezoidal rule but my output is off by a lot any suggestions?
import sympy as sym
from sympy.abc import x
def trapizodial_rule(b,a,n):
delta_x=(b-a)/(n)

    print(delta_x)
    a=a-delta_x
    subinterval=[]
    import math
    integrand= (math.e**x)*(x**3)+(1/(4*x**0.5))

    while a + delta_x <= b:
    a = delta_x + a
    subinterval.append(a)
    
    list1=[]
    for n in range(0,n):
    f1=integrand.subs(x,subinterval[n])
    list1.append(f1)
    
    list2=[]
    for n in range(1,len(list1)-1):
    f2=2*list1[n]
    list2.append(f2)
    
    middleterm = sum(list2)
    outerterm = list1[0] + list1[n+1]
    traprule=((delta_x/2)*(middleterm + outerterm))
    print(traprule)

the correct output is around 16 million but I got around 9 million I have another program that is almost exactly like this but the indexes for some of the lists are a little different because the subinterval list could have an even or an odd number of items. the other program gives the correct approximation for the integrand x^3 on the interval [2,4]. I'm up for any suggestions because the goal is to have any integrand to be approximated not just x^3

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/quantboi
πŸ“…︎ Jul 15 2021
🚨︎ report
Long summations from trapezoidal rule, simpsons rule and other integration approximations.

Is it okay to directly place the long summations in pm solver? need help from mods

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/reyjeeve123
πŸ“…︎ Jul 13 2021
🚨︎ report
[calc 2] trapezoidal rule

I made a program in python for the trapezoidal rule and want to make a graph that shows the approximation error, approximation, and true value. The problem is that I don’t know the terminology for what that type of graph would be called. I was going to use matlibplot but I don’t know what the appropriate graph to use. I think it would be cool to make a graph but I need help. Any suggestions would be greatly appreciated.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/quantboi
πŸ“…︎ Jul 18 2021
🚨︎ report
Trapezoidal Rule - With Discontinuity at between limits of integration.

How would I be able to do the trapezoidal rule for example in the integral of x^2+1/x+1 -tanx/x+2 from -4 to 5 with 3 sub intervals? It would have an undefined value when at the -1 value.

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/rasheedkabul69
πŸ“…︎ Apr 07 2021
🚨︎ report
How to convert trapezoidal rule when the answers are given instead of a function?

Hello,

I've got the trapezoidal rule where func is a function declared in the program.

// multi application trapezoidial rule
double trap(double a, double b, double (* func)(double), int segments){
    double integral  = func(a) + func(b);
    double h = (b-a)/n;

    for (int i = 1; i < n; i++){
        integral += 2 * func(a + i*h);
    }
    integral *= (b-a) / (2*n);
    return integral;
}

How can I convert this if I am given the following table of answers instead of a function:

x 0 1 2 3 4 5
f(x) 0 2.4 2.67 2.2 1.9 0

I've stored this table in a struct of x and y.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/FutileCheese28
πŸ“…︎ Apr 22 2021
🚨︎ report
Finding real root using different methods, Applying Lagrange's formula and Newton's divided difference formula implication. trapezoidal rule, Simpson's 1/3rd rule, Simpson's 3/8th rule , weddle's rule implications reddit.com/gallery/mec8v6
πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Mar 27 2021
🚨︎ report
How do I find h? Trapezoidal Rule . I know h would be 8/n. What's n?
πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/maalik_reluctant
πŸ“…︎ Jan 31 2021
🚨︎ report
[College calc] Estimate the minimum number of subintervals using trapezoidal and simpsons rule?
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/juses_crust14
πŸ“…︎ Oct 13 2020
🚨︎ report
Numerical integration with Trapezoidal Rule youtube.com/watch?v=rt7Uf…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Danielka54
πŸ“…︎ Oct 30 2020
🚨︎ report
Help with function that uses the trapezoidal rule to integrate this function from 0 to 4.

%Trapezoidal

f =@(x) 1-exp(-x);
I= trap(f(x),0, 4);
function I=trap(func,a,b,n,varargin)
if nargin<3
    error('at least 3 inputs required');
end
if ~(b>a)
    error('upper bound must be greater than lower')
end
if nargin<4||isempty(n)
    n=100;
end
    x=a;
    h=(b-a)/n;
    s=func(a,varargin{:});
    for i=1 : n-1
        x=x+h;
        s=s+2*func(x,varargin{:});
    end
    s=s+func(b,varargin{:});
    I=(b-a)*s/(2*n);
end

I keep getting this error

Array indices must be positive integers or logical values.

Error in sym/subsref (line 900)
            R_tilde = builtin('subsref',L_tilde,Idx);

Error in ICA_9>trap (line 24)
    s=func(a,varargin{:});

Error in ICA_9 (line 7)
I= trap(f(x),0, 4);

I honestly don't know what's wrong it can someone please point me to the right direction?

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/seminaia
πŸ“…︎ Apr 09 2020
🚨︎ report
Numerical integration with Trapezoidal Rule [3] youtube.com/watch?v=rt7Uf…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Danielka54
πŸ“…︎ Oct 30 2020
🚨︎ report
Trapezoidal Rule - Formula Explained? K variable?

What does the k variable represent in the trapezoidal rule?

https://preview.redd.it/f1rr9rspjk451.png?width=511&format=png&auto=webp&s=9349834db098074f45655c891847b500ec3369cd

Thanks!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/gleepster
πŸ“…︎ Jun 13 2020
🚨︎ report
[VIDEO] Numerical integration with Trapezoidal Rule
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Danielka54
πŸ“…︎ Oct 30 2020
🚨︎ report
Question about solving integral trapezoidal rule

So I’m trying to do a question using the trapezoidal rule (question 2)

https://imgur.com/a/uP41PaT

I haven’t done a question that has dx in the numerator before (dx is usually written to the side like in question 1). I was wondering if we would just treat this as if the numerator is 1 or if not, how would I solve?

Update: I got it right.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/tractorscotty
πŸ“…︎ Apr 29 2020
🚨︎ report
[IB Math SL, Calculus, Trapezoidal Rule] Where did I go wrong here?
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Ninclemdo
πŸ“…︎ Feb 27 2020
🚨︎ report
[Grade 11 maths] How do I perform the trapezoidal rule in this question? I don't understand the formula or how to apply it.
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Japanese_Noises
πŸ“…︎ Jun 27 2019
🚨︎ report
How do you use the trapezoidal rule when the graph is split into trapezoids with different delta Xs?

I had a question like this on my test a few classes ago and was unsure how to do it. Thanks!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Despacitodos
πŸ“…︎ Nov 15 2019
🚨︎ report
Numerical integration with Trapezoidal Rule
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Danielka54
πŸ“…︎ Oct 30 2020
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.