numerically approximate the solution to a first-order initial-value problem - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : Student Package : Numerical Analysis : Visualization : Student/NumericalAnalysis/InitialValueProblem

Student[NumericalAnalysis][InitialValueProblem] - numerically approximate the solution to a first-order initial-value problem

Calling Sequence

InitialValueProblem(ODE, IC, t=b, opts)

InitialValueProblem(ODE, IC, b, opts)

Parameters

ODE

-

equation; first order ordinary differential equation of the form ⅆⅆtyt=ft,y

IC

-

equation; initial condition of the form y(a)=c, where a is the left endpoint of the initial-value problem

t

-

name; the independent variable

b

-

algebraic; the point for which to solve; the right endpoint of this initial-value problem

opts

-

(optional) equations of the form keyword=value, where keyword is one of method, submethod, numsteps, output, comparewith, digits, order, or plotoptions; options for numerically solving the initial-value problem

Description

• 

Given an initial-value problem consisting of an ordinary differential equation ODE, a range a <= t <= b, and an initial condition y(a) = c, the InitialValueProblem command computes an approximate value of y(b).

• 

If the second calling sequence is used, the independent variable t will be inferred from ODE.

• 

The InitialValueProblem command computes its numeric solution using the specified method and submethod (if applicable). Options given in opts are also observed.

• 

The endpoints a and b must be expressions that can be evaluated to floating-point numbers. The initial condition IC must be of the form y(a)=c, where c can be evaluated to a floating-point number.

• 

The methods for numerically solving initial-value problems can be explored interactively with the InitialValueProblem tutor.

Notes

• 

By their very nature, multi-step methods (such as the Adams methods) impose a minimum on the number of steps allowed. If numsteps is lower than this minimum, then the minimum will be used instead to determine the step size. In general, if k previous function values are required to perform the multi-step method, then numsteps must be at least k1.

• 

This procedure operates using floating-point numerics; that is, inputs are first evaluated to floating-point numbers before computations proceed, and numbers appearing in the output will be in floating-point format.

Examples

withStudent&lsqb;NumericalAnalysis&rsqb;&colon;

DE1:=&DifferentialD;&DifferentialD;tyt&equals;ytt2&plus;1&colon;

InitialValueProblemDE1&comma;y0&equals;0.5&comma;t&equals;3

5.066

(1)

InitialValueProblemDE1&comma;y0&equals;0.5&comma;t&equals;3&comma;output&equals;Error

0.8916

(2)

DE2:=&DifferentialD;&DifferentialD;tyt&equals;1cost&colon;

DE3:=&DifferentialD;&DifferentialD;tyt&equals;ytt2&plus;t39&colon;

the order of the Taylor polynomial used by a Taylor method in the comparewith option can be specified as the second item in the list:

InitialValueProblemDE2&comma;y1&equals;3.10&comma;t&equals;5&comma;method&equals;rungekutta&comma;submethod&equals;rkf&comma;comparewith&equals;taylor&comma;2&comma;output&equals;information&comma;digits&equals;3

tMaple's numeric solutionR-K-FError2nd-Ord. TaylorError1.3.103.100.3.100.1.803.773.770.002383.740.032.605.035.030.004035.030.3.406.606.600.002996.680.084.208.018.010.003058.170.165.8.908.900.0003959.090.19

(3)

InitialValueProblemDE2&comma;y1&equals;3.10&comma;t&equals;5&comma;method&equals;rungekutta&comma;submethod&equals;rkf&comma;comparewith&equals;taylor&comma;1&comma;taylor&comma;2&comma;output&equals;plot

InitialValueProblemDE3&comma;y0&equals;1&comma;t&equals;3&comma;method&equals;taylor&comma;order&equals;2&comma;comparewith&equals;taylor&comma;3&comma;adamsmoulton&comma;step3&comma;output&equals;plot

See Also

Student[NumericalAnalysis], Student[NumericalAnalysis][AdamsBashforth], Student[NumericalAnalysis][AdamsBashforthMoulton], Student[NumericalAnalysis][AdamsMoulton], Student[NumericalAnalysis][Euler], Student[NumericalAnalysis][RungeKutta], Student[NumericalAnalysis][Taylor], Student[NumericalAnalysis][VisualizationOverview]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam