Qurak

Check the results of NDSolve

హౌ-టు 8 దశలు, ఒకే సెషన్‌లో క్రమంగా నడుస్తాయి. ప్రతి దశా ఇంజిన్‌పై అమలు చేయబడింది, కింది అవుట్‌పుట్ అది ఇచ్చినదే.

దశ 1
lowsol = NDSolve[{y'[x] == 1 / (2 y[x]), y[0] == 1 / 10}, y, {x, 0, 1}, InterpolationOrder -> All];

అవుట్‌పుట్ లేదు - ఈ దశ తదుపరి దానికి ఏదో సిద్ధం చేస్తుంది.

దశ 2
highsol = NDSolve[{y'[x] == 1 / (2 y[x]), y[0] == 1 / 10}, y, {x, 0, 1}, WorkingPrecision -> 22, InterpolationOrder -> All];

అవుట్‌పుట్ లేదు - ఈ దశ తదుపరి దానికి ఏదో సిద్ధం చేస్తుంది.

దశ 3
Plot[Evaluate[RealExponent[(y[x] /. lowsol) - (y[x] /. highsol)]], {x, 0, 1}]
అవుట్‌పుట్
-Graphics-
దశ 4
residual[x_] = y'[x] - 1 / (2 y[x]);

అవుట్‌పుట్ లేదు - ఈ దశ తదుపరి దానికి ఏదో సిద్ధం చేస్తుంది.

దశ 5
Plot[Evaluate[RealExponent[{residual[x] /. lowsol, residual[x] /. highsol}]], {x, 0, 1}, PlotStyle -> {GrayLevel[0], RGBColor[1, 0, 0]}, AxesOrigin -> {0, 0}]
అవుట్‌పుట్
-Graphics-
దశ 6
sol = NDSolve[{x''[t] + 1 / 10 x'[t] + x[t] (x[t]^2 - 1) == 3 / 10 Cos[t], x[0] == x'[0] == 0}, x, {t, 0, 100}, InterpolationOrder -> All];

అవుట్‌పుట్ లేదు - ఈ దశ తదుపరి దానికి ఏదో సిద్ధం చేస్తుంది.

దశ 7
hpsol = NDSolve[{x''[t] + 1 / 10 x'[t] + x[t] (x[t]^2 - 1) == 3 / 10 Cos[t], x[0] == x'[0] == 0}, x, {t, 0, 100}, WorkingPrecision -> 24, InterpolationOrder -> All];

అవుట్‌పుట్ లేదు - ఈ దశ తదుపరి దానికి ఏదో సిద్ధం చేస్తుంది.

దశ 8
Plot[Evaluate[RealExponent[(x[t] /. sol) - (x[t] /. hpsol)]], {t, 0, 100}]
అవుట్‌పుట్
-Graphics-

వాడిన ఫంక్షన్లు

సంబంధిత రెసిపీలు

అన్ని రెసిపీలు · ఫంక్షన్ రిఫరెన్స్ · దీన్ని MCP క్లయింట్ నుండి వాడండి