MaplePrimes Questions

Define a piecewise function of  so that the the value of the function is  if  or if , it is equal to the vertical distance between the curves if . Numerically integrate the area under this curve on the non-zero interval and explain how the numerical answer is what you would anticipate the answer to be given that this curve is related to semi-circles.

The curve is defined by

Hi everyone,

Was hoping someone could point me in the right direction. A homework question asks us to create a function using arrow (->) notation which take a Maple list of complex numbers as its input and returns the largest modulus from that list.

I've tried writing this without arrow notation --

Say L1 is a list of complex numbers:

max(abs~(L1))

and this seems to work fine. But I'm particularly struggling with how to introduce the arrow notation into this.

Any help would be much appreciated!

Hi. Can anyone help me with this error, it says 

Error, (in unknown) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 

restart

Shootlib := "F:\MAPLE\3";

"F:MAPLE3"

(1)

libname := Shootlib, libname;

"F:MAPLE3", "C:\Program Files\Maple 2015\lib", "."

(2)

with(Shoot);

[shoot]

(3)

with(plots):

``

FNS := {`φp`(eta), f(eta), fp(eta), fpp(eta), fppp(eta), phi(eta), theta(eta), `θp`(eta)}

{`φp`(eta), f(eta), fp(eta), fpp(eta), fppp(eta), phi(eta), theta(eta), `θp`(eta)}

(4)

ODE := {diff(`φp`(eta), eta) = (-f(eta)*`φp`(eta)+K*phi(eta)*(1-phi(eta))^2)*Sc, diff(f(eta), eta) = fp(eta), diff(fp(eta), eta) = fpp(eta), diff(fpp(eta), eta) = fppp(eta), diff(fppp(eta), eta) = (-fppp(eta)-f(eta)*fpp(eta)+k1*(2*fp(eta)*fppp(eta)-fpp(eta)^2)+lambda*fp(eta)+(1+Fr)*fp(eta)^2)/(k1*f(eta)), diff(phi(eta), eta) = `φp`(eta), diff(theta(eta), eta) = `θp`(eta), diff(`θp`(eta), eta) = (-f(eta)*`θp`(eta)+y*f(eta)*fp(eta)*`θp`(eta))/(1/Pr-y*f(eta)^2)}

{diff(`φp`(eta), eta) = (-f(eta)*`φp`(eta)+K*phi(eta)*(1-phi(eta))^2)*Sc, diff(f(eta), eta) = fp(eta), diff(fp(eta), eta) = fpp(eta), diff(fpp(eta), eta) = fppp(eta), diff(fppp(eta), eta) = (-fppp(eta)-f(eta)*fpp(eta)+k1*(2*fp(eta)*fppp(eta)-fpp(eta)^2)+lambda*fp(eta)+(1+Fr)*fp(eta)^2)/(k1*f(eta)), diff(phi(eta), eta) = `φp`(eta), diff(theta(eta), eta) = `θp`(eta), diff(`θp`(eta), eta) = (-f(eta)*`θp`(eta)+y*f(eta)*fp(eta)*`θp`(eta))/(1/Pr-y*f(eta)^2)}

(5)

blt := 4.; 1; IC := {`φp`(0) = Psi, f(0) = 0, fp(0) = 1, fpp(0) = 0, fppp(0) = alpha, phi(0) = 0, theta(0) = 1, `θp`(0) = beta}

4.

 

{`φp`(0) = Psi, f(0) = 0, fp(0) = 1, fpp(0) = 0, fppp(0) = alpha, phi(0) = 0, theta(0) = 1, `θp`(0) = beta}

(6)

BC := {fp(blt) = 0, fpp(blt) = 0, phi(blt) = 1, theta(blt) = 0};

{fp(4.) = 0, fpp(4.) = 0, phi(4.) = 1, theta(4.) = 0}

(7)

``

infolevel[Shoot:-shoot] := 1:

.7

 

1.0

 

.2

 

.2

 

1.0

 

.3

 

.5

 

.3

(8)

S := shoot(ODE, IC, BC, FNS, [alpha = 3.0125, beta = -2.31, Psi = -0.])

shoot: Step #  1

shoot: Parameter values :  alpha = 3.0125 beta = -2.31 Psi = -0.

Error, (in unknown) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 

p := odeplot(S, [eta, fp(eta)], 0 .. 15)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

display(p)

Error, (in plots:-display) expecting plot structure but received: p

 

p2 := odeplot(S, [eta, theta(eta)], 0 .. 10)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

display(p2)

Error, (in plots:-display) expecting plot structure but received: p2

 

p3 := odeplot(S, [eta, phi(eta)], 0 .. 10)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

display(p3)

Error, (in plots:-display) expecting plot structure but received: p3

 


 

Download Darcy.mw

Below are five subsindets commands.

I believe I understand the actions of B and C, but I fail to understand the actions, individually and taken together, of  E, F and G.

 

B := subsindets(u(i, j)^2*v(i, j)+u(i-1, j), 'specfunc(u)', proc (f) options operator, arrow; subsop(1 = op(1, f)+1, f) end proc);

C := subsindets(u(i, j)^2*v(i, j)+u(i-1, j), 'specfunc(anything, u)', proc (f) options operator, arrow; subsop(1 = op(1, f)+1, f) end proc);

E := subsindets(u(i, j)^2*v(i, j)+u(i-1, j), 'specfunc(symbol, u)', proc (f) options operator, arrow; subsop(1 = op(1, f)+1, f) end proc);

F := subsindets(u(i, j)^2*v(i, j)+u(i-1, j), 'specfunc(`+`, u)', proc (f) options operator, arrow; subsop(1 = op(1, f)+1, f) end proc);

G := subsindets(u(i, j)^2*v(i, j)+u(i-1, j), 'specfunc({`+`, symbol}, u)', proc (f) options operator, arrow; subsop(1 = op(1, f)+1, f) end proc);

Where can I find a thorough explanation of specfunc with examples?

Hi,

I am looking for a function which gives me the name of a variable. Something like NameOf :

-------------------

x:=1;

y:=Array(1..2);

NameOf(x);

"x"

Nameof(y);

"y"

-----------------------------------

It must be standard but I am very new to Maple...

Thanks,

 

 

{R = 7.339698158, S = 2.378491488, W = 2.512047349}

if i have thes set as aresult of multibull equations by using fsolve how to say to maple assign the value of R to another parameter say X and the value of S to Y and so on ???

please help

Any one can help me to convert matlab codes to maple.Matlab_code.mw
 

%Finite element method code for solving bvp nonlinear ODEs%

% u''+uu'-u=exp(2x), u(0)= 1, u(1)=e     %

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function FEM_Code()

clear all; close all; clc

n=5;                     % NO of element

nn=n+1;                  % No of nodes

lgth=1;                  % Domain length

he=lgth/n;               % lenth of each elemnet

x=[0:he:lgth];           % Data point for independant variable

AC=0.00005;              % Accuracy

F=zeros(nn,1);           % Initialization

F(1)=exp(0); F(nn)=exp(1);  % Boundary conditions

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Direct Iterative process to handle nonlinear problem

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

c=1.0;

count=0;                   % Initializations for count for iterations

tic                        % Time start

while (c>0)

        [F1]=assembly(F,n,he);

          c=0.0;

          for i=1:nn

            if (abs(F(i)-F1(i))>AC)

                 c=c+1;

                 break;

            end

          end

         F=F1;

         count=count+1;

end

  disp('Hence solution=:');

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  % Output for prinmary and secondary variables %%%

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  diff=abs(F-exp(x)');

  fprintf('No of element=%d\n',n)

  disp('      x       FEM          Exact       Error')

  disp([x',F,exp(x)',diff])

  fprintf('No of iterations=%d\n',count)

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  %%% Ploting of primary variable %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  

  plot(x,F,'--rs','Linewidth',2)

  xlabel('x')

  ylabel('u(x)')

  title('solution plot to given BVP')

  toc                                % given totlal time

  

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Derivative of element matrix and Assembly%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

function [F1]=assembly(F,n,he)

nn=n+1;

k = zeros(nn,nn);               % Initialization of main Matrix

R = zeros(nn,1);                % Initialization of RHS Matrix

syms x                          % x as symbolic variable

s=[1-x/he,x/he];                % linear shape function

ds=diff(s,x);                   % Differentiations of shape function

lmm =[];

for i=1:n

    lmm=[lmm;[i,i+1]];          % connectvity Matrix

end

for i=1:n

    lm=lmm(i,:);

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %%% Generation of Element Matrix k11 and RHS Matrix f1%%%%%%%%%%

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    k11=-int(ds'*ds,x,0,he)+(int(s'*ds*s(1),x,0,he)*F(lm(1))...

        +int(s'*ds*s(2),x,0,he)*F(lm(2)))-int(s'*s,x,0,he);

    f1 = int(exp(2*(x+(i-1)*he))*s',x,0,he);

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %%% Assembly accroding to connectivity Matrix%%%%%%%%%%%%%%%%%%%%

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    

    k(lm,lm) = k(lm,lm) + k11;

    R(lm) = R(lm) + f1;

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Imposing Boundary Conditions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

k(1,:) = 0.0; k(nn,:) = 0.0;

k(1,1) = 1.0; k(nn,nn) = 1.0;

R(1,1) = F(1); R(nn,1) = F(nn);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Solution of equations (F1) %%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

d = k\R;           % better than using inverse k*R

F1 = d;

end

 

    

 

                                

 

 

 

  

        

      

 

 

 

 

 

 


 

Download Matlab_code.mw

i am attaching the codes and file. i will be thankful to you .

When I solve in worksheet mode the limit of (2*abs(x-2)+abs(x+1)-3)/(abs(x^2-4)+x-2) evaluating the limit in x=2- the result is 1/3 and in x=2+ the result is 3/5, but if I try to use the Tutorial/Single Variable/Limits, an error occurs.

Any Suggestion?

 

Hi all,

can some one please help me check the  mapple file.AZIZ.mw i copied from the the paper by abdul Aziz with reference [doi:10.1016/j.cnsns.2008.05.003] .

Thank you for your help

I want to find general formulas of the sequence satifies:
f(1) = 1, f(n+1) = 1/2*(f(n)+9/f(n))
I tried 
restart;
rsolve({f(1) = 1, f(n+1) = 1/2*(f(n)+9/f(n))}, {f})

I got the answer
3*coth((1/2)*arccoth(1/3)*2^n)

How to get the form (-3*2^(2^(-1+n))+3*(-1)^(1+2^(-1+n)))/(-2^(2^(-1+n))+1)?

 

Hi MaplePrimes,

I want to find the arithmetic mean of all radius from ellipse sector.

Let me explain: I want the average radius of the interval in red
on the ellipse that is between the two radios

 

restart;
with(inttrans);
[addtable, fourier, fouriercos, fouriersin, hankel, hilbert, 

  invfourier, invhilbert, invlaplace, invmellin, laplace, mellin, 

  savetable]
laplace((diff(Dirac(t), t))*cos(t), t, s);
                               0
int((diff(Dirac(t), t))*exp(-s*t)*cos(t), t = 0 .. infinity);
                              1  
                              - s
                              2  
 

 

Hello,

 

   What is the best way to create and save a library file with things like constants, procs, etc.

 

My work domain is the physical atmosphere and get tired of calling the many different scientific packs, copying over standard variables, running initition procs to start a new work book.

 

I'd like a worksheet, or library that has the ~10-20 basic scientific properties of dry air, most air, the reynolds calcs as a proc, etc.   A second call would be to standard material props lib used in our aero business.

 

I have not yet used Maple library tools to create a library and the initial documentation is a bit thin about differences and best practices.  I have tried to put this into the startup code section but then it's copy paste from file to file.  The best would be to load the file that is maintianed in one location, but used by many worksheet/docs.

 

I'd like to just have a basic "Initiate proc()" that would call a lib, or multiple lib/packages data to set all my globals, establish my physical prorperties, set the units system, etc.  upon opening and file initialization.   

 

I am also confused about "lib", ".M", ".mla" differences and modules versus libraries.   I do think I understand packages as sort of a proc library - just called packages ??   am I correct.  I have never tried to create or establish one. 

 

The issue for me with packages vs lib, modules and some confusion on the method procedures to set them up and get them properly instantiated when called.. 

 

So, do these lib, packages, modules have instantiation / initiation specifics to make them available when creating the package/lib  to use the with() command? 

 

I tried save and read with limited success.

 

Any recomendations welcome.  The last time I created libs was in C.  

 

Sorry if this is possibly confusing the different methods.  Is there a really good book/tutorial on file management, especially libraries, proc, module definition and storage benefits.  Best practices for maple?

 

Regards,

Bill

 

 

how I can find an non-trial solution (non-zero) for differential equations?

Thanks

y.mw
 

restart; Nb := 2; Nt := .5; f1 := Nb*(diff(sigma(y), y, y))+Nt*(diff(theta(y), y, y)) = 0; f2 := diff(theta(y), y, y)+Nb*(diff(sigma(y), y))*(diff(theta(y), y))+Nt*(diff(theta(y), y))^2 = 0; f3 := (D(sigma))(0) = 0; f4 := (D(theta))(0) = 0; f5 := sigma(1) = 0; f6 := theta(1) = 0; f7 := dsolve({f1, f2, f3, f4, f5, f6}, {sigma(y), theta(y)}, numeric, output = listprocedure); plots:-odeplot(f7, [[y, sigma(y)]], y = 0 .. 1, legend = [y], labels = [y, sigma(y)]); plots:-odeplot(f7, [[y, theta(y)]], y = 0 .. 1, legend = [y], labels = [y, theta(y)])

2

 

.5

 

2*(diff(diff(sigma(y), y), y))+.5*(diff(diff(theta(y), y), y)) = 0

 

diff(diff(theta(y), y), y)+2*(diff(sigma(y), y))*(diff(theta(y), y))+.5*(diff(theta(y), y))^2 = 0

 

(D(sigma))(0) = 0

 

(D(theta))(0) = 0

 

sigma(1) = 0

 

theta(1) = 0

 

[y = proc (y) local _res, _dat, _solnproc; option `Copyright (c) 1993 by the University of Waterloo. All rights reserved.`; _dat := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); YP := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = -.0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = -.0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = -.0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = -.0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = -.0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = -.0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = -.0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = -.0}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 8, [sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, yout, L, V) end if; [y = outpoint, seq('[sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)]'[i] = yout[i], i = 1 .. 4)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(1..5, {(1) = 18446746401092086174, (2) = 18446746401092086614, (3) = 18446746401092086790, (4) = 18446746401092086966, (5) = 18446746401092087142}), (3) = [y, sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], (4) = 0}); _solnproc := _dat[1]; if member(y, ["last", 'last']) then _res := _solnproc("last"); if type(_res, 'list') then return _res[1] end if elif type(y, `=`) and member(lhs(y), ["initial", 'initial']) then if type(rhs(y), 'list') then _res := _solnproc("initial" = [0, op(rhs(y))]) else _res := _solnproc("initial" = [1, rhs(y)]) end if; if type(_res, 'list') then return _res[1] end if elif y = "sysvars" then return _dat[3] end if; y end proc, sigma(y) = proc (y) local res, data, solnproc, `sigma(y)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](y) else outpoint := evalf(y) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); YP := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = -.0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = -.0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = -.0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = -.0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = -.0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = -.0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = -.0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = -.0}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 8, [sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, yout, L, V) end if; [y = outpoint, seq('[sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)]'[i] = yout[i], i = 1 .. 4)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(1..5, {(1) = 18446746401092086174, (2) = 18446746401092086614, (3) = 18446746401092086790, (4) = 18446746401092086966, (5) = 18446746401092087142}), (3) = [y, sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(y) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(y) else `sigma(y)` := pointto(data[2][2]); return ('`sigma(y)`')(y) end if end if; try res := solnproc(outpoint); res[2] catch: error  end try end proc, diff(sigma(y), y) = proc (y) local res, data, solnproc, `diff(sigma(y),y)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](y) else outpoint := evalf(y) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); YP := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = -.0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = -.0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = -.0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = -.0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = -.0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = -.0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = -.0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = -.0}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 8, [sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, yout, L, V) end if; [y = outpoint, seq('[sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)]'[i] = yout[i], i = 1 .. 4)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(1..5, {(1) = 18446746401092086174, (2) = 18446746401092086614, (3) = 18446746401092086790, (4) = 18446746401092086966, (5) = 18446746401092087142}), (3) = [y, sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(y) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(y) else `diff(sigma(y),y)` := pointto(data[2][3]); return ('`diff(sigma(y),y)`')(y) end if end if; try res := solnproc(outpoint); res[3] catch: error  end try end proc, theta(y) = proc (y) local res, data, solnproc, `theta(y)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](y) else outpoint := evalf(y) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); YP := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = -.0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = -.0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = -.0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = -.0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = -.0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = -.0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = -.0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = -.0}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 8, [sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, yout, L, V) end if; [y = outpoint, seq('[sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)]'[i] = yout[i], i = 1 .. 4)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(1..5, {(1) = 18446746401092086174, (2) = 18446746401092086614, (3) = 18446746401092086790, (4) = 18446746401092086966, (5) = 18446746401092087142}), (3) = [y, sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(y) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(y) else `theta(y)` := pointto(data[2][4]); return ('`theta(y)`')(y) end if end if; try res := solnproc(outpoint); res[4] catch: error  end try end proc, diff(theta(y), y) = proc (y) local res, data, solnproc, `diff(theta(y),y)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](y) else outpoint := evalf(y) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); YP := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = -.0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = -.0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = -.0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = -.0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = -.0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = -.0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = -.0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = -.0}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .1428571428571428, (3) = .2857142857142856, (4) = .4285714285714285, (5) = .5714285714285715, (6) = .7142857142857144, (7) = .8571428571428572, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 8, [sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, yout, L, V) end if; [y = outpoint, seq('[sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)]'[i] = yout[i], i = 1 .. 4)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return HFloat(-0.0) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(1..5, {(1) = 18446746401092086174, (2) = 18446746401092086614, (3) = 18446746401092086790, (4) = 18446746401092086966, (5) = 18446746401092087142}), (3) = [y, sigma(y), diff(sigma(y), y), theta(y), diff(theta(y), y)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(y) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(y) else `diff(theta(y),y)` := pointto(data[2][5]); return ('`diff(theta(y),y)`')(y) end if end if; try res := solnproc(outpoint); res[5] catch: error  end try end proc]

 

 

 

NULL


 

Download y.mw

 

First 650 651 652 653 654 655 656 Last Page 652 of 2308