Let the complex number be z=x+iy, where x and y are real.
The given equation is
z+2∣z+1∣+i=0
Substituting z=x+iy gives
(x+iy)+2∣z+1∣+i=0
Combine the real and imaginary parts:
Real part : x+2∣z+1∣=0 −(1)
Imaginary part : y+1=0⟹y=−1 −(2)
Next, write ∣z+1∣ in terms of x and y.
Since z+1=(x+1)+iy, using y=−1 from (2) gives
∣z+1∣=(x+1)2+(−1)2=(x+1)2+1 −(3)
Insert (3) into the real-part equation (1):
x+2(x+1)2+1=0
⟹
x=−2(x+1)2+1
Square both sides to remove the square root:
x2=2[(x+1)2+1]
Simplify the right side:
(x+1)2+1=x2+2x+1+1=x2+2x+2
Hence
x2=2(x2+2x+2)=2x2+4x+4
Bring all terms to one side:
0=2x2+4x+4−x2=x2+4x+4
Recognise the perfect square:
(x+2)2=0⟹x=−2
Thus, from (2) and the value of x,
z=−2−i
The magnitude of z is
∣z∣=(−2)2+(−1)2=4+1=5
Therefore, ∣z∣=5, which corresponds to Option C.