' - - File: XVa  Solve Boundary Value Problem (BVP) - - Method 1.
'     The BVP command solves the linear system: X''(t) + p(t)*X'(t) + q(t)*X(t) = r(t)
'          where p(t), q(t), & r(t) are functions of the independent variable, t.

pi = 3.14159

'  Given:  X"(t) = -4x
' Note the placement order in the command line. Let y = x'
F{t,x,y} = y
G{t,x,y}= -4 x

to = 0  : xo = -2  : tb = pi/4  :  xb = 10  :  n = 50 :
BVP[F, G, {to,xo,tb,xb,n}]

' - - - - - - - - - - - - - - - - - Exact Solution for comparison - - - - - - - - - - - - - - - - -
Y{t} = -2 Cos[2 t] + 10 Sin[2 t]
P<t> = <t, Y, 0>
tx = 0.02 : ty = 0  : tz = 0
T<t> = vTran[P, tx,ty, tz]                 ' Translate image to compare with BVP solution.
'Plot[T, {t, to,tb, n}]                           ' Option: plot to compare.

' Remove comment and use the dots options located on the graphics menus.
'  Also, use vector P rather than T above.
Plot[P, {t, to, tb, n}]


