How do you solve
d^2y/dx^2 = k^2 y
for boundary conditions:
y = y0 when x =0
y = 0 when x = infinity
Any help would be much appreciated.
Not quite. You actually have to include both solutions, at first, and then use your boundary conditions to determine the two arbitrary constants. Remember: the solution to a second-order DE should always two arbitrary constants. So what will your general solution, with two arbitrary constants, look like?
The DE can be written as . It is obviously homogeneous.
Now refer to your class notes and textbook on how to solve second order DE's with constant coefficients.
Alternatively, you can substitute where and then integrate directly with respect to y and then solve the resulting 1st order DE.
As always, the techniques, applications and examples are found in the class notes and textbook.