Given: a1+5d=2
Let y=a1a4a5=a1(a1+3d)(a1+4d) =(2−5d)(2−2d)(2−d) ( Putting a1=2−5d) =2(4−16d+17d2−5d3)
The value of d at which y attains maxima is given by dxdy=0(by calculus) ⇒−16+34d−15d2=0 ⇒d=3034±14=32,58
Now, dx2d2y=34−30d>0 for d=32 <0 for d=58
Hence, y is maximum for d=58