Quadratic equation with multiple parameter

I have the following equation:

$$x^2 +mx+(a−m)^2 =0\text{ ($a$ be there as a fixed parameter)}$$

and I need to calculate for which values of $m$ the equation has exactly one solution for $x.$

I know I have to look the value of $m$ for which the discriminant of this equation is equal to $0.$ But every time when I went this path is got stuck.

Can someone give me some hint I need to search for or look for when trying to calculate this?


Addition:

One thing I forgot to mention is that first of all the goal is to find a value for $m$ and afterwards to calculate the solution(s) fo $x$.


Solution 1:

OK, calculate the discriminant: $$m^2-4(a-m)^2=(m+2(a-m))(m-2(a-m))=0$$ This is zero precisely when one of the two factors is zero, so $$m+2(a-m)=0\implies m=2a$$ $$m-2(a-m)=0\implies m=\frac23a$$

Solution 2:

For $Ax^2+Bx+C=0$ to have only one solution, $B^2-4AC = 0$ or $B^2 = 4AC$.

So we need $m^2 = 4(a-m)^2 = (2(a-m))^2 \Rightarrow m = \pm(2a-2m) \Rightarrow \color{blue}{m =2a, \frac{2a}{3}}$


To calculate the solution of the equation,

$Ax^2+Bx+C$ has sum of the roots $= \frac{-B}{A}$. Here as the discriminant is zero, both the roots are equal, $x_1 = x_2$.

So, $2x_1 = -\frac{B}{A} = -m \Rightarrow \boxed{x_1 = x_2 =-\frac{m}{2}}$.

The roots are either $\boxed{-a}$ or $\boxed{-\frac{a}{3}}$ corresponding to $m=2a, \frac{2a}{3}$ respectively.


Graph for solutions:

Corresponding to $m=2a$ and $m=\frac{2a}{3}$

Solution 3:

$$x^2+mx+(a-m)^2=0.$$ Since the roots are equal, $$m^2-4(a-m)^2=0$$ $$m^2-(2a-2m)^2=0$$ $$(m+2a-2m)(m-2a+2m)=0$$ $$m=\frac{2a}{3},2a.$$ Plug in these values of m in original equation, we get two quadratic equations. $$x^2+2ax+a^2=0$$ and $$9x^2+6ax+a^2=0$$ Now you can find the roots of these equations by Vieta's formulas.

The roots of these equations are $-a$ and $\frac{-a}{3}$.