A bar consists of two portions BC and C D of the same material and of the same length L, but of different cross sections. Determine the strain energy of the bar when it is subjected to an axial load P, expressing the result in terms of P, L, E, the crosssectional area A of portion C D, and the ratio n of the two diameters.