Eigenfunction expansion

Use the appropriate engenfunction expansion to represent the best solution.

 $u^{{\prime\prime}}=f(x),u^{{\prime}}(0)=\alpha,u^{{\prime}}(1)=\beta$

I use the function

 $\phi^{{\prime\prime}}+\lambda\phi=0$

to get the eigenfunction is

 $\phi=A\cos x\sqrt{\lambda}+B\cos x\sqrt{\lambda}$

but how should I decide A and B? Is it by system

 $\phi^{{\prime}}(0)=\alpha,\phi^{{\prime}}(1)=\beta$

or it should be

 $\phi^{{\prime}}(0)=0,\phi^{{\prime}}(1)=0$

and why? After getting eigenvalue and eigenfunctions, what should I do? I hope somebody can give me a answer with details. Thanks.

eigenfunction expansion

i would say ϕ′⁢(0)=α,ϕ′⁢(1)=β But you made a mistake in that it should be

Asin(... +Bcos(.... ANd not both cos(....

And then you should be able to solve A,B for arbitrary a and beta as long as lambda is not an integer multiple of pi^2 in which case there may not be a solution - also you should have chosen different symbols because a and A could be taken to be the same when they need to be different arbitrary and likewise beta and B.