i have put up and question about the NDSolve
and have got the solution of the ODE,and also got the figure of t1-t
,however when i use the solution of the t1-t
to integrate ,the integral didn't converge and the figure of the p1
is continous but when i export the p1
result to the EXCEL,the figure is Discontinuous,so how to deal with it?
the related questions
and i have Extract the equation of the original question and
codes are as this
equa00 = 0.` - \[Piecewise] {
{2 x''[t] + 1/2 (4900.` + 259 x''[t] + 2 (4900.` + 500 x''[t])),
x'[t] >= 0},
{4900.` + 503 x''[t], x'[t] < 0},
{0, \!\(\*
TagBox["True",
"PiecewiseDefault",
AutoDelete->False,
DeletionWarning->True]\)}
} + 159715.5` (0.25` Cos[1.7951958020513104` t] - x[t]) -
13130.602263408473` Cos[
1.7951958020513104` t] (0.613591041570793` +
0.25` Cos[1.7951958020513104` t] - x[t]) +
6519.` Abs[-0.4487989505128276` Sin[1.7951958020513104` t] -
x'[t]] (-0.4487989505128276` Sin[1.7951958020513104` t] -
x'[t]) + 16297.5` (\[Piecewise] {
{0.56796693652872623432387422799011`31.754323054547157,
x'[t] >= 0},
{0.49855266876742266072254490600473`31.69771104538948,
x'[t] < 0},
{0, \!\(\*
TagBox["True",
"PiecewiseDefault",
AutoDelete->False,
DeletionWarning->True]\)}
}) (0.613591041570793` + 0.25` Cos[1.7951958020513104` t] -
x[t]) (-0.8056819919256618` Cos[1.7951958020513104` t] -
x''[t]) == 10000 x''[t];
t1 = \[Piecewise] {
{2 x''[t] + 1/2 (4900 + 259 x''[t] + 2 (4900 + 500 x''[t])),
x'[t] >= 0},
{4900 + 503 x''[t], x'[t] < 0},
{0, \!\(\*
TagBox["True",
"PiecewiseDefault",
AutoDelete->False,
DeletionWarning->True]\)}
};
t0 = 100;
s1 = NDSolve[{equa00, x[0] == 1, x'[0] == 1}, x, {t, 0, t0},
SolveDelayed -> True]
p1 = (t1 /. s1)*(x[t] /. s1);
Plot[p1, {t, 0, t0}, PlotRange -> All]
period = 23.14;
paverage = NIntegrate[p1, {t, 40, 40 + period}]/period
i just want to integrate the p1
,however it doesn't converge
NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. >>
NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in t near {t} = {43.7509}. NIntegrate obtained -7211.41 and 23.400613386693852` for the integral and error estimates. >>
the result is
{-311.643}