Complete the square

1. Oct 27, 2007

solidus_E

this isn't really a homework problem

it's just me trying to understand a part of an example problem from a modern physics book

it's an integral of a wave packet, blah blah blah

but they go on to say "...to evaluate the integral, we first complete the square in the exponent as..."

$$ikx - a^2k^2 = - (ak - \frac{ix}{2a} )^2 - \frac{x^2}{4a^2}$$

how in the world does one arrive at that???

Last edited: Oct 27, 2007
2. Oct 27, 2007

cristo

Staff Emeritus
3. Oct 27, 2007

solidus_E

but it doesn't help

edit: nm, i see what's going on....but can someone explain wtf

Last edited: Oct 27, 2007
4. Oct 27, 2007

Kurdt

Staff Emeritus
If you can elaborate on what exactly it is you're struggling with then perhaps someone can help you.

5. Oct 27, 2007

solidus_E

getting started lol

how would you work with the $$a^2k^2$$

6. Oct 27, 2007

arildno

$$ikx-a^{2}k^{2}=-((ak)^{2}-ikx))=-((ak)^{2}-2(ak)\frac{ix}{2a})$$
What must you add&subtract in order to generate an expression in which k is hidden away linearly within a square?

7. Oct 27, 2007

solidus_E

where did you get the $$\frac{ix}{2a}$$

8. Oct 28, 2007

arildno

$$ikx=1*ikx=\frac{2a}{2a}*ikx=2(ak)\frac{ix}{2a}$$

9. Oct 28, 2007

Kurdt

Staff Emeritus
If you take a look at a general example it may help clarify. We use the fact that:

$$(x+b)^2 = x^2+2bx +b^2$$

which can be written as,

$$(x+b)^2 -b^2 = x^2 +2bx$$

Now if you look at what arildno has done in post number 6, hes written your equation in the form $x^2+2bx$ where $x=-(ak)$ and $b=\frac{ix}{2a}$. Now I'm sure you can confirm for yourself from here where they obtained the equation in your original post.