Qurak

Nd solve bvp shooting method

ट्यूटोरियल 5 चरण, एक सत्र में क्रम से चलाए गए। हर चरण इंजन पर निष्पादित हुआ और नीचे का आउटपुट वही है जो उसने उत्पन्न किया।

चरण 1
sols = Map[First[NDSolve[{x''[t] + Sin[x[t]] == 0, x[0] == x[10] == 0}, x, t, Method -> {"Shooting", "StartingInitialConditions" -> {x[0] == 0, x'[0] == #}}]]&,
	{1.5, 1.75, 2}];
Plot[Evaluate[x[t] /. sols], {t, 0, 10}, PlotStyle -> {StandardBrown, StandardBlue, StandardGreen}]
आउटपुट
-Graphics-
चरण 2
eqn = x'''[t] - 2λ x''[t] - λ^2x'[t] + 2λ^3x[t] == (λ^2 + π^2) (2 λ Cos[π t] + π Sin[π t]);
bcs = {x[0]  ==   1 + (1 + E^-2 λ + E^-λ/2 + E^-λ), x[1] == 0, x'[1] == (3 λ - E^-λ λ/2 + E^-λ)};
xsol[t_]  =   (E^λ (t - 1) + E^2 λ (t - 1) + E^-λ t/2 + E^-λ) + Cos[π t];

कोई आउटपुट नहीं - यह चरण अगले के लिए कुछ तैयार करता है।

चरण 3
Block[{λ = 10},
	sol = First[NDSolve[{eqn, bcs}, x, t]];
	Plot[{xsol[t], x[t] /. sol}, {t, 0, 1}]]
आउटपुट
-Graphics-
चरण 4
Block[{λ = 10},
	sol = First[NDSolve[{eqn, bcs}, x, t,
	Method -> {"Shooting", "StartingInitialConditions" -> {x[1] == 0, x'[1] == (3 λ - E^-λ λ/2 + E^-λ), x''[1] == 0}}]];
	Plot[{xsol[t], x[t] /. sol}, {t, 0, 1}]]
आउटपुट
-Graphics-
चरण 5
Block[{λ = 15},
	sol = First[NDSolve[{eqn, bcs}, x, t,
	Method -> {"Shooting", "StartingInitialConditions" -> {x[2 / 3] == 0, x'[2 / 3] == 0, x''[2 / 3] == 0}}]];
	Plot[{xsol[t], x[t] /. sol}, {t, 0, 1}]]
आउटपुट
-Graphics-

प्रयुक्त फ़ंक्शन

संबंधित रेसिपी

सभी रेसिपी · फ़ंक्शन संदर्भ · इसे किसी MCP क्लाइंट से उपयोग करें