Make a straight line parallel to BC through point D and take DE=AB on this line to connect AE and EC, then ADE and ABC are congruent, AE=AB=AC, from which we know that A is a point of a circle, and B, E and C are three points on the circle.
Angle DAE=40 degrees, angle EAC=60 degrees (triangle AEC is equilateral), angle BCE= half angle BAE=20 degrees, angle CDE= angle DCE= 10 degrees, and the result is 30 degrees.