rhnaeco 0 Newbie Poster

I am trying to use Simpson's Law to find the area in some profiles i have and i'd like to do this in a in a shell script as this how the data has been created.
an example of the file ( without the brackets):
(1) (2)
(a) 12.146 -0.65
(b) 12.146 -0.67
(c) 12.147 -0.71
(d) 12.147 -0.78
etc
etc
I need to use this formula:

a2 + 4 *( b2 + c2)

so that i have a third column like:

(1) (2)
(a) 12.146 -0.65 1.59 a2 + 4 *( b2 + c2)
(b) 12.146 -0.67
(c) 12.147 -0.71 -0.43 c2 + 4 *( d2 + e2)
(d) 12.147 -0.78

i know it can be done in matlab- but is there any way of doing this in awk or any other shell programs ?