another function that appears quite often in algorithm analysis is the quadratic functionf(nn that isgiven an input value nthe function assigns the product of with itself (in other words" squared"the main reason why the quadratic function appears in the analysis of algo rithms is that there are many algorithms that have nested loopswhere the inner loop performs linear number of operations and the outer loop is performed linear number of times thusin such casesthe algorithm performs operations nested loops and the quadratic function the quadratic function can also arise in the context of nested loops where the first iteration of loop uses one operationthe second uses two operationsthe third uses three operationsand so on that isthe number of operations is ( ( in other wordsthis is the total number of operations that will be performed by the nested loop if the number of operations performed inside the loop increases by one with each iteration of the outer loop this quantity also has an interesting history in german schoolteacher decided to keep his and -year-old pupils occupied by adding up the integers from to but almost immediately one of the children claimed to have the answerthe teacher was suspiciousfor the student had only the answer on his slate but the answer was correct-- , -and the studentcarl gaussgrew up to be one of the greatest mathematicians of his time it is widely suspected that young gauss used the following identity proposition for any integer > we have ( ( ( )/ we give two "visualjustifications of proposition in figure figure visual justifications of proposition both illustrations visualize the identity in terms of the total area covered by unit-width rectangles with heights , , in (athe rectangles are shown to