ClearAll["Global`*"];
$HistoryLength=2;
SetDirectory[NotebookDirectory[]];

FileNames[]

data1=<<"dataTrafo";
ListPlot[data1,AxesLabel->{"Ueff","Ief"},PlotRange->All]

ω=2.*Pi*50;
data2=data1/.{a_,b_}:>{((a*(Sqrt[2]))/ω),b};
ListPlot[data2,AxesLabel->{"ϕeff","Ief"},PlotRange->All];
ListPlot[data2,AxesLabel->{"ϕAmpl","Ief"},PlotRange->{Automatic,{0,1000}}]

mezfi=830;
datalin=Select[data2,#[[1]]<mezfi&];
(*test[{fi_,i_}]:=fi<mezfi;
datalin=Select[data2,test]*)

nahrlin=Fit[datalin,fi,fi];
a=D[nahrlin,fi];

fce[fi_,b_,c_]:=a*fi+b*fi*(((1.(fi^2)))^c);
effHodnota1[fiAmpl_,b_,c_]:=Module[{fi,T},
fi[t_]:=fiAmpl*Sin[ω*t];
T=((2 π)/ω);
√((1/T)*NIntegrate[((fce[fi[t],b,c])^2),{t,0,T}])
];
effHodnota1[1000,.1,.2]//Timing

normFunction[x_]:=(x^2);
error[{fiAmpl_,effProud_},{b_,c_}]:=normFunction[effHodnota1[fiAmpl,b,c]-effProud];
errorCelk[parametr:{b_,c_}]:=Plus@@(error[#,parametr]&/@Drop[data2,1]);
errorCelk[{0.1,0.2}]

data2

(*T=((2 π)/ω);
myInt[expr_]:=Module[{difoska,y},
difoska=y'[t]==expr;
y[T]/.NDSolve[{difoska,y[0]==0},y,{t,0,T}][[1]]
];
myInt[((Cos[ω*t])^2)]//Timing*)

(*Options[NIntegrate]
Options[NDSolve]*)

(*k=0.1;
normFunction[x_]:=(Sqrt[(x^2)+(k^2)])-k;
Plot[normFunction[x],{x,-0.5,0.5}]*)