Mp=938.272; (*mass of proton, MeV*)
Mn=939.565;(*mass of neutron, MeV*)
Ebind=3.925 ;(*binding energy ((of )^8)He, MeV*)
Esep=24.81432; (*1p separation energy ((for )^8)He, MeV*)
p=197.327;
mass=821;
range=2.5;

fIn[q_,r_,ang_]:=q r SphericalBesselJ[ang,q r]
fOut[k_,r_,ang_]:=((((2/Pi)k r))^(1/2)) BesselK[ang+(1/2),k r]
dfInR[q_,r_,ang_]:=D[fIn[q,r,ang],r]
dfIn[q_,ang_]:=Simplify[dfInR[q,r,ang]/.r->range]
dfOutR[k_,r_,ang_]:=D[((((2/Pi)k r))^(1/2)) BesselK[ang+(1/2),k r],r]
dfOut[q_,ang_]:=Simplify[dfOutR[q,r,ang]/.r->range]

Plot[((fIn[((Sqrt[2 mass (-Esep+U)])/p),range,0])/(dfIn[((Sqrt[2 mass (-Esep+U)])/p),0]))-((fOut[((Sqrt[2 mass Esep])/p),range,0])/(dfOut[((Sqrt[2 mass Esep])/p),0])),{U,0,50}]

FindRoot[((fIn[((Sqrt[2 mass (-Esep+U)])/p),range,0])/(dfIn[((Sqrt[2 mass (-Esep+U)])/p),0]))-((fOut[((Sqrt[2 mass Esep])/p),range,0])/(dfOut[((Sqrt[2 mass Esep])/p),0]))==0,{U,50}]

FindRoot[fIn[((Sqrt[2 mass (-Esep+46.48728734369617`)])/p),range,0]-coeff *fOut[((Sqrt[2 mass Esep])/p),range,0]==0,{coeff,1}]

FindRoot[(A^2) Integrate[((fIn[((Sqrt[2 mass (-Esep+46.48728734369617)])/p),r,0])^2), {r,0,range}]+(((8.80922839269386*A))^2) Integrate[((fOut[((Sqrt[2 mass Esep])/p),r,0])^2), {r,range,Infinity}]==1, {A,0.2}]

Plot[Piecewise[{{0.7583626465084375fIn[((Sqrt[2 mass (-Esep+46.48728734369617)])/p),r,0],r<range},{0.7583626465084375 8.80922839269386 fOut[((Sqrt[2 mass Esep])/p),r,0],r>range}}],{r,0,10}]