There is an explicit solution for the differential equation which can simplify things:
DSolve[{y''[x] + a y[x] == 0, y[0] == b, y'[0] == c}, y, {x, 0, 10}][[1, 1, 2, 2]]
b Cos[Sqrt[a] x] + (c Sin[Sqrt[a] x])/Sqrt[a]
If the recent edit in the original question really requires that function raised to a power that must be estimated with the data, then that value can only take on odd integer values (so that we can obtain real and sometimes negative values to match the data).
NonlinearModelFit doesn't allow such restrictions of parameters (as far as I can tell) but we can set various values of d and choose the value of d that minimizes either the $AIC$ or $AIC_c$ value.
d = {-9, -7, -5, -3, -1, 1, 3, 5, 7, 9}
aicc = Table["aicc", {i, Length[d]}];
Do[aicc[[i]] =
NonlinearModelFit[data, {(b Cos[Sqrt[a] x] + (c Sin[Sqrt[a] x])/Sqrt[a])^d[[i]]},
{a, b, c}, x]["AICc"],
{i, Length[d]}];
ListPlot[{{{1, aicc[[n + 1]]}}, Transpose[{d, aicc}]},
PlotStyle -> {{Green, PointSize[0.03]}, Red}]

We see that d = 1 results in the smallest $AIC_c$ value.
So to estimate the remaining parameters we set d = 1 and find the 95% confidence bands for the fit.
nlm = NonlinearModelFit[data,
b Cos[Sqrt[a] x] + (c Sin[Sqrt[a] x])/Sqrt[a], {a, b, c}, x];
nlm["BestFitParameters"]
(* {a -> 1.0403738146939832, b -> 2.4710141618669903, c -> 2.295887035294033} *)
mpb = nlm["MeanPredictionBands"];
Show[ListPlot[data],
Plot[{nlm[x], mpb}, {x, Min[data[[All, 1]]], Max[data[[All, 1]]]}]]

The residuals aren't great as the points near the peak and the trough are all underestimated. Another model might be considered or an examination into why the data isn't a great fit to the theoretical model. (Note that the confidence bands don't account for the fact that we needed to estimate d.)
g2^r[x]supposed to be? Maybe you wantedg2[a, b, c][x]^d? But, consider also the use ofParametricNDSolve[]. – J. M.'s missing motivation Dec 29 '16 at 22:28g[x]is a function, then the syntax to square it isg[x]^2and notg^2[x]. This is what JM was referring to. – Nasser Dec 29 '16 at 22:41denters the equation. It's currently in your parameter list but nowhere else. Ifris another constant to be estimated, it also needs to be in the parameter list and entered into the function correctly (as was mentioned by @J.M.). – JimB Dec 29 '16 at 23:45g2has an explicit result usingDSolve(b Cos[Sqrt[a] x] + (c Sin[Sqrt[a] x])/Sqrt[a]) so that should simplify things. However, the recent edit by @aminbk raises that result to a potentially non-integer power (d). If that is correct, doesn'tdneed to be restricted to integer powers to get a real number? – JimB Dec 30 '16 at 00:42