Question: Trapezoidal rule

Hi, i have a problem with getting a constant number out of a function, i guess theres a problem in my algorythm but i cant seem to find it. Any help appreciated. In the link i send a screen shot. First picture declares the procedure and second trying to apply it. The result should be a number with no unknown (x).

https://prnt.sc/gv92cy 

https://prnt.sc/gv92on 

Please Wait...