How to solve this numerical integration i have this integration equation, i want to solve it with numerical integration. am no maths pro, so i just need a way to break it down and solve using one of the numerical methods

i need it broken down or so i can write a program that will numerically integrate it once I input the values of B and the upper limit p.
the value of z depends on the value of p. For every slight change in p, z changes also. The formulas to calculate z is given below:

The equation for y

 A: This is a Matlab script that may be a good place to start. It sets up $F$ as a vector, finds the root for each value of $p$ and stores that as a vector. This is then used to define a vector containing the value of the function over the integration interval. You then integrate by summing over the vector and multiplying by the line element. You may need greater accuracy when finding the root so you could use the Matlab fzero function as well once you have found roughly where the root is by this method. I can email the file if you think it would be useful. If you don't have Matlab the underlying principal will be the same in another program and you could start from this method except the "sum" and "min" commands may be program specific. Apologies for poor resolution, couldn't get my head round the HTML lark so I used a tiff file...

A: The simpliest (and less acurate) way to numerically integrate is to compute the function in several points equally spaced in [3, p] and them compute the mean of those values multiplied by $p-3$ (Tks Graham and Petr for pointed that! )
