Two gradient updates

Problem

For f(w)=(w−4)2f(w)=(w-4)^2, start at w0=1w_0=1 with learning rate η=14\eta=\frac{1}{4}. Compute w1w_1 and w2w_2.

Reveal answer or reference solution

The derivative is f′(w)=2(w−4)f'(w)=2(w-4). The first gradient is −6-6, so

w1=1−14(−6)=52.w_1=1-\frac{1}{4}(-6)=\frac{5}{2}.

The next gradient is −3-3, so

w2=52−14(−3)=134.w_2=\frac{5}{2}-\frac{1}{4}(-3)=\frac{13}{4}.

Both steps approach w=4w=4.

Outcome

Previous attempts

Loading attempts saved in this browser…

    Review Screening Results