I have some data
to which I am trying to fit a function
U:=(m,d,Theta,T)-> (((3*(6.62607e-34)^2*T)/(4*Pi^2*m*1.36085e-23*Theta^2))*((T/Theta)*int(x/(exp(x)-1),x=0..Theta/T) + (Theta/(4*T))))/1e-10^2 +d^2;
where Theta≈200 and d≈0.035. T, Theta, d, m > 0
When I try and solve
> NonlinearFit(U(0.15036/6.022e23,d,Theta,T),X,Y,T,initialvalues=[Theta=200, d=0.035]);
I get the error "Error, (in Statistics:-NonlinearFit) complex value encountered"
I can plot the function with Theta=200 and d=0.035, I get approximately the right curve and no errors about complex values.
How can I solve for Theta and d without encountering this error?