# Plot of derivative does not show

I have following function 4/((1 + v1[h])*(1 + v2[h])):

Ones = Function[h,
NIntegrate[(1/(2*Pi))*
E^(-I*x)*(-h + Cos[x] - I Sin[x])/Sqrt[1 + h^2 - 2 h Cos[x]], {x,
0, 2 Pi}]];
Ones2 = Function[h,
NIntegrate[(1/(2*Pi))*
E^(I*x)*(-h + Cos[x] - I Sin[x])/Sqrt[1 + h^2 - 2 h Cos[x]], {x,
0, 2 Pi}]];
Zeros = Function[h,
NIntegrate[(1/(2*Pi))*(-h + Cos[x] - I Sin[x])/
Sqrt[1 + h^2 - 2 h Cos[x]], {x, 0, 2 Pi}]];
v1 = Function[h,
Re[1/Sqrt[
2] (\[Sqrt](2 Zeros[h]^2 + Ones[h]^2 + Ones2[h]^2 +
Ones[h] Sqrt[
4 Zeros[h]^2 + Ones[h]^2 - 2 Ones[h]* Ones2[h] +
Ones2[h]^2] +
Ones2[h] Sqrt[
4 Zeros[h]^2 + Ones[h]^2 - 2  Ones[h]* Ones2[h] +
Ones2[h]^2]))]];
v2 = Function[h,
Re[1/Sqrt[
2] (\[Sqrt](2 Zeros[h]^2 + Ones[h]^2 + Ones2[h]^2 -
Ones[h] Sqrt[
4 Zeros[h]^2 + Ones[h]^2 - 2 Ones[h]* Ones2[h] +
Ones2[h]^2] -
Ones2[h] Sqrt[
4 Zeros[h]^2 + Ones[h]^2 - 2  Ones[h]* Ones2[h] +
Ones2[h]^2]))]];
Plot[{4/((1 + v1[h])*(1 + v2[h]))}, {h, 0, 2},
PlotLegends -> Automatic]


However, when I try to use the following code to plot the derivative of this function, nothing shows up:

d1 = Function[h,
Re@Derivative[Function[h, 4/((1 + v1[h])*(1 + v2[h]))]][h]];
Plot[d1[h], {h, 0, 2}]


How can I solve this problem?

## 1 Answer

Re or Im are functions that are not differentiable. E.g. consider the following:

Limit[(Re[x + I y + del] - Re[x + I y])/del, del -> 0]
Limit[(Re[x + I y + I  del] - Re[x + I y])/(I del), del -> 0]

1

0


and you see that the value is direction dependent.

What can you do? See e.g. in the help about Re. You may use ComplexConjugate or ComplexExpand.