Only one application of the chain rule is needed (if the expression to be differentiated is [itex]\exp((x/2)^2)[/itex], that is). Do you really need the chain rule to compute the derivative of (x/2)^2=x^2/4?