math calculus
posted by Paige .
. Folding a Pyramid  A pyramid with a square base and four faces,
each in the shape of an isosceles triangle, is made by cutting away four
triangles from a square piece of cardboard and bending up the resulting
triangles to form the walls of the pyramid. What is the largest volume
the pyramid can have assuming that the square piece of cardboard has
sides measuring a m?
I got everything but the I can't see to find the right solutions, I need help with my differentiation

I must be missing something here. In order for the corners of the triangles to meet, each must have base m/√8 but that gives 4 triangles that just meet in the center if folded up.
For their height to bee enough to form a pyramid, they must overlap, but then the shape is no longer square.
If you cut off 4 small triangles from a square, you get an octagon. How do you fold up "the resulting triangles"?
what formula do you come up with for the volume?