(* Wienuv posunovaci zakon *)
(* f=2πhc^2/λ^5/(Exp[hc/(λkT)]-1) *)

b=.;x=.

f=1/λ^5/(Exp[b/λ]-1)

b=1;Plot[f,{λ,0,1},PlotRange->All]

b=.

eq=Simplify[D[f,λ]==0]

lhs=Factor[eq[[1]]]

cit=Numerator[lhs]

cit2=Expand[cit/λ]

b=λ x

cit3=Simplify[cit2]

Plot[cit3,{x,-3,7}]

koren=FindRoot[cit3,{x,1}]

koren=FindRoot[cit3,{x,7}]

hc/k==koren[[1,2]] λ T

(* MTF kruhova apertura *)

prekryv=Integrate[Integrate[1,{y,0,Sqrt[1-(x+a/2)^2]}],{x,0,1-a/2},Assumptions->0<a<1]

norma=Simplify[prekryv,a==0]

otf=Simplify[prekryv/norma]

Plot[prekryv/norma,{a,0,2}]

(* rektangularni apertura + defokus *)

a=.; e=.

prekryv=Re[Integrate[Exp[-I e (x-a/2)^2]Exp[I e (x+a/2)^2],{x,0,(1-a)/2}]]

norma=prekryv/.a->0

norma=Limit[prekryv,a->0]

otf=prekryv/norma

pl1=Plot[otf/.e->0.001,{a,0.001,1},PlotRange->All]

pl2=Plot[otf/.e->10,{a,0.001,1},PlotRange->All,PlotStyle->Green]

pl3=Plot[otf/.e->30,{a,0.001,1},PlotRange->All,PlotStyle->Red]

Show[{pl1,pl2,pl3},PlotRange->All]