Question :

The cantilever beam AB of length L carries a uniformly distributed W load , which includes the weight of the beam.

(Note that the left end end A is free , while right end has a fixed support)

(i) Derive the equation of the elastic curve.
(ii) Compute the maximum displacement of the beam.

My work :

First I considered a section of beam of length x from left end A and derived an equation for bending moment(M) which gave,
M + (Wx/L)(x/2) = 0

M = -(W*(x^2))/2L) which is equal to EIy' = -(W*(x^2))/2L)

==> EIy' = -(W*(x^3))/6L) + C1

==> EIy = -(W*(x^4))/24L) + C1L + C2 , where C1, C2 are arbitrary constants and y' & y' denote second & first derivatives of y, respectively.
EI is constant.

I found C1 = (w*(L^2))/6 and C2 = -(w*(L^3))/8

==> EI*y' = -(W*(x^3))/6L) + (w*(L^2))/6

==> EI*y = -(W*(x^4))/24L) + (w*(L^3))/6 + -(w*(L^3))/8

For the 2nd part,

I tried calculating max. displacement manually by equating y' = 0 and substituting the x value I got, to y.

y' = -(W*(x^3))/6L) + (w*(L^2))/6 = 0

==> -(W*(x^3))/6L) + (w*(L^3))/6L = 0

==> (w*(L^3))/6L = (W*(x^3))/6L)

==> (w*(L^3)) = (W*(x^3))

==> L^3 = x^3 ==> x^3 - L^3 = 0

==> (x-L)(x^2 + Lx + L^2) = 0

==> x = L or x^2 + Lx + L^2 = 0

But at x=L, y= 0

Hence, x^2 + Lx + L^2 = 0

==> x =[ -L + /- sqrt(L^2 - 4L^2)]/2

==> x = [ -L + /- sqrt(-3L^2)]/2 ] , which are not real values

Following a different process, then I differentiated y w.r.t.x and equated it to 0

EI*y = -(W*(x^4))/24L) + (w*(L^3))/6 + -(w*(L^3))/8

y' = w/24EI(4L^2 - ((3x^3)/L) )

and equating y' = 0 to find x such that max.y can be found,

w/24EI(4L^2 - ((3x^3)/L) ) = 0

4L^2 - ((3x^3)/L) ) = 0

3x^3 = 4L^3 x^3 = 4/3(L^3) ,

which also doesn't seem to give the expected answer of x = 0

Could you help find my mistake?

Thanks!