MaplePrimes Questions

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

 

I wish to process a string of letters into a list of one or more characters which are comma separated at each change of character. The following function will achieve this, but its output is not as list [ ] in the format required.  

Below is a routine to split a character string based on change of character: (ref: https://rosettacode.org/wiki/Split_a_character_string_based_on_change_of_character#Maple)

splitChange := proc (str::string) local start, i, len; start := 1; len := StringTools:-Length(str); for i from 2 to len do if str[i] <> str[start] then printf("%s, ", str[start .. i-1]); start := i end if end do; printf("%s", str[start .. len]) end proc;
splitChange("WPKCPYWYYYXHYY");# 

Here is the output:
W, P, K, C, P, Y, W, YYY, X, H, YY

This print-to screen output is not usable, instead I need the output in list format i.e. ListY:= ["W", "P", "K", "C", "P", "Y", "W", "YYY", "X", "H", "YY"].

Background

 In my model, each of these character strings is a node of a graph, and their adjacencies represent an edges of a graph.  I aim to automatically map strings into a set of directed adjacencies as output; for example:  

AdjSet:= {[W, P], [P, K], [K, C], [C, P], [P, Y], [Y, W], [W,YYY],[YYY, X], [X, H], [H,YY]}.

This set will be the input to a directed graph, e.g: 
M := Digraph(AdjSet); DrawGraph(M);
from which our objective, the adjacency matrix of the nodes can be obtained in MAPLE.  

Help

Can someone please help me by modifying the SplitChange rountine so that it produces output in the form of ListY above? 

Thanks in anticipation of your help

Melvin Brown
 

L := 35; k := .1990625; R := 0.4e-2; r0 := .1;
eq7 := Dmax+deltaH+.5 = 6.76;
eq8 := R*L^2/(4*k)-2*de*deltaH-deltaH^2 = 0;
eq6 := L/(8*((L-1.4*Dmax)^2/(8*Dmax*L)+ln(.7*Dmax/r0)/Pi));
solve({eq6, eq7, eq8}, {Dmax, de, deltaH});
Warning, solutions may have been lost
 

I entered these equations but maple will not solve it. What do I do wrong?

For every (fixed) given integer k = 0,1,2,..., consider the following real valued function of x:

     f(x,k) = exp(x)*HeunC(2*x, 1/2, -1/2, -x^2, k*(k+1) + 1/8, 99/100)

Let xnk denote the n-th positive zero of f(x,k), for n=1,2,3,... Then I am interested to find the asymptotic behaviour of xnk. My hope is that there is an asymptotically linear behaviour of the form

     xnk ~ a + b*n + c*k

with real constants a,b,c.

Note: The last argument "99/100" in the function above is thought to be an approximation for the limit to 1 from below. For instance, I would prefer a value 0.9999999...  

_____________________________________________________

EDIT: The plot below is what I could reach with maple without to get instabilities (l=k)

This result was obtained with:

(Sorry, but I don't know how to insert the true Maple code)

Hi,

In a recent post acer made me discover the joy of Typesetting to customize the outputs (acer, if you read this question: big thanks to you, really funny and powerful!)

I'm interested in using Typesetting for output coloring (for instance) but I would like that these outputs to be left justified.
Up to now I used to use printf to manage the outputs the way I wanted, but I failed combining Typesetting and printf.

Is it possible to exploit the capabilities of Typesetting in printf commands?
Or, at least, is it possible to "left-justify" print outputs programatically?

Thanks for your answers

Hi

Somewhere in the code I've written I've made a mistake: A being a table, I wrote B := eval(A) instead of B := copy(A).
Next A and B were saved in a .m file.

I became aware of my mistake when I read this file in another Maple session.
I modified some entry of B and the corresponding entry of A became modified too.
But this raise the first question: let's say the command B:=eval(A) creates a bon between A and B, why this "bond" is not limited to the current session and by what process is it conserved through  the save/read operations?

To investigate this I wrote this notional piece of code:
 

restart:
A := table([1=x]);
B := eval(A);
FA := "......";   # the name of some file
FB := "......";   # the name of some file
FC := "......";   # the name of some file
save A, B, FC;  # basically what I do in my true code
save A, FA;
save B, FB;

# first attempt
restart;
FC := "......";   # the same name as above
read FC;
B[1] := y;
A[1];
     y


# second attempt
restart;
FA := "......";   # the same name as above
FB := "......";   # the same name as above
read FA;
read FB;
B[1] := y;
A[1];
     x

Why is the "bond" between A and B lost in this second case ?

A-B.mw

First 769 770 771 772 773 774 775 Last Page 771 of 2427