Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015



 Anyone can explain to me this program using Runge Kutta fourth order method

Download program.mwprogram.mw

Anyone can explain to me the Runge Kutta method using the following equations and conditions??

 

diff (diff (diff (f (eta), eta), eta), eta)+ f (eta)* diff (diff (f (eta), eta), eta)=0

diff (diff (theta (eta), eta), eta)+ f (eta)* diff (theta (eta), eta)=0

f(0) = 0, (D(f))(0) = 0, (D(f))(5) = 1

theta(0) = 1, theta(5) = 0

Hi, 
I'm very stunned by the results displayed in the worksheet below.
It seems that adding extra assumptions on a variable already constrained with "assume" has disturbing side effects ?

Here is a simplified worksheet that exhibits the phenomenon.
Basically I want to solve the equation a*x-b =b with respect to x.
In a first step I set assumptions on a and b and Maple returns x=0, as expected.
Next I add a new condition on b and ask Maple to solve the equation again. I intain this strange result: x=(b~ - b~)/a~.

Am I doing something wrong?

Thanks in advance


 

restart:

anames(user);

assume(a > 0):
assume(b > 0):

f := a*x+b

a*x+b

(1)

g := f=b:
simplify(g);
solve(g, a);

a*x+b = b

 

Warning, solve may be ignoring assumptions on the input variables.

 

0

(2)

anames(user);

b, g, f, a

(3)

additionally(b > a)

h := f=b:
simplify(h);
solve(h, a);

a*x+b = b

 

Warning, solve may be ignoring assumptions on the input variables.

 

anames(user)  # additionally(b > a) doesn(t introduce a new variable

b, h, g, f, a

(4)

indets(g);
indets(h);  # why do I have b~ twice ?
            # This is probably the reason why solve(h, a) doesn't work

{a, b, x}

 

{a, b, b, x}

(5)

lprint(indets(h))

{a, b, b, x}

 

# strange...

solve(h, indets(h)[1]);

simplify(%);

Warning, solve may be ignoring assumptions on the input variables.

 

-(b-b)/x

 

-(b-b)/x

(6)

# remark, dismantle explains nothing about the distinction between b~ and b~


EQUATION(3)
   POLY(6)
      EXPSEQ(4)
         NAME(4): a
         NAME(4): b
         NAME(4): x
      DEGREES(HW): ^2 ^1 ^0 ^1
      INTPOS(2): 1
      DEGREES(HW): ^1 ^0 ^1 ^0
      INTPOS(2): 1
   NAME(4): b
 

 

dismantle(h)


EQUATION(3)
   POLY(6)
      EXPSEQ(4)
         NAME(4): a
         NAME(4): b
         NAME(4): x
      DEGREES(HW): ^2 ^1 ^0 ^1
      INTPOS(2): 1
      DEGREES(HW): ^1 ^0 ^1 ^0
      INTPOS(2): 1
   NAME(4): b
 

 
 

 


 

Download MultipleAssumptions.mw

 

Maple 2015

Suppose you want to plot x = Rcos(omega*t) for t = 0..4Pi/omega.

Below is the sketch of the function.  Is there a way to plot the functions using Maple's plotting syntax?

plot(R*cos(omega*t), t = 0 .. 4*Pi/omega);
Error, (in plot) expecting a real constant as range endpoint but received 4*Pi/omega
Thanks

How to plot the solution of pde

pde:=diff(u(x,t),t) =K*diff(u(x,t),x, x); 

I can't step further,  i can't insert boundary value problem, plz help me to solve pde.

Hear u(x,t)->infinity  when t->infinity  and diff(u(x,t),x) =0 when x=0 for all t 

Please ignore my mistake,

I use Maple 2015, is it possible to animate a standing wave as shown below?

 

 A working animation can be found on https://oceanservice.noaa.gov/facts/seiche.html

I'm trying to better understand the Black and Scholes model; which is a scalar function on (positive reals)^5.
a maplesoft worksheet defines it as

BS_Price=exp(-r*T)*(-(1/2)*erf((1/4)*sqrt(2)*(sigma^2*T-2*r*T+2*ln(K)-2*ln(S[0]))/(sigma*sqrt(T)))+1/2)

I am trying to understand the parameter vectors (r ,T,K,S[0],sigma) that give the same values of BS_Price - and particularly whether these form curves, closed curves, surfaces or similar.

Right now, I am not sure how to procede.

EDIT
I've just put together  a procedure that evaluates BS at points in R^5 - and i think i can move forward by using the curry or rcurry functions to get a 5d tensor of the values of BS, that i can start to look for patterns within.

BS_Price := proc (InterestRate, StockPrice, StrikePrice, Duration, Volatility) evalf(subs([r = InterestRate, S[0] = StockPrice, K = StrikePrice, T = Duration, sigma = Volatility], exp(-r*T)*(-(1/2)*erf((1/4)*sqrt(2)*(sigma^2*T-2*r*T+2*ln(K)-2*ln(S[0]))/(sigma*sqrt(T)))+1/2))) end proc

could anyone give me advice on doing this?
 

https://aws.amazon.com/getting-started/projects/deploy-elastic-hpc-cluster/

is it possible to use maple on high performance clusters?

i can only think to use c program to call cmaple with MPI in linux to use high performance clusters.

is there any other official method to do this?

if i upload my maple 2015 version to amazon for this computing, will it used up all license in this first chance of installation leading to that i can not install maple 2015 linux version to other machine?

Hi! For a process control exercise I'm trying to obtain the coefficients of different powers of the variable to design a PID controller. I have obtained the following equation :

Gc := (s^2*t^2+2*s*t*x+1)*(-b*s+1)/(k(-b*s+1)*s(tc+b))

 

I want to simplify it into an equation of the following form :

Gc = a( 1 + 1/(b*s) + c*s )

where a, b and c would be determined by Maple from the previous equation. I've tried using simplify() expand(simplify()) in different ways from the documentation and other threads, but to no avail. Any help would be greatly appreciated!

 

Thanks a lot!

Antoine.

Hi, 

Could you explain me where the third output comes from?

print~([a, b]);
   a
   b
   [ ]

Thanks in advance

Hello,

How do I tell maple which branch to choose when calculating an asymptotic series of a RootOf expression. e.g.

restart;

sol:=RootOf((8*n-8)*_Z^6+(n^4+36*n^2-68*n+56)*_Z^5+(n^5+10*n^4+80*n^3-200*n^2+224*n-152)*_Z^4+(n^6+28*n^5+69*n^4-268*n^3+468*n^2-356*n+200)*_Z^3+(3*n^7+32*n^6+7*n^5-204*n^4+380*n^3-544*n^2+272*n-128)*_Z^2+(3*n^8+14*n^7-20*n^6-32*n^5+252*n^4-240*n^3+304*n^2-80*n+32)*_Z-n^9-12*n^8-44*n^7-40*n^6-4*n^5-128*n^4+48*n^3-64*n^2);

asympt(sol,n,2);

 

Now the series contains RootOf(_Z^6-_Z^5) which occurs in the denominator to order 1/n and thus blows up if 0 is chosen. I know that the solution must be greater zero and smaller than n/2.

I'm trying to make a Least-Squares curve fitting plot.  I need to sequence two rows from a data file I imported (see attached worksheet GR10_20190130_PSA_TESTS.mw).  More specifically, I need to sequence the data in

X:=Row(T,1) with the data in y:=Row(T,2).  It should look like

([41115.0,6.97],[41257.0,18.9],[41270.0,15.67]...[43495.0,4.06]) when complete.  I tried seq[X_k,Y_k], that didn't work.  Also tried using an index of 1 to 25 (the number of elements in each row), that didn't work.  Any help with this appreciated, thanks in advance!

Les


I have a hard to understand quotient of multivariate polynomials- my intuition is that the denominator nearly divides the numerator - and it could be rewritten as:

remainder+(much simpler numerator)/denominator

as far as I can see the functions quo and rem aren't designed for this - but I'm certain that people in the maple community must have overcome this kind of problem before

MVP_quotient.mw


I have an object in 6d I'd like to visualise. The region of 6d space I am interested in is described by these equations:

{f[10] = -(.2000000000*(5.*f[21]*f[20]*f[22]-5.*f[20]*f[22]^2+20.*f[20]*f[21]-20.*f[20]*f[22]+135.*f[20]+46.*f[21]))/(f[21]*(f[21]-1.*f[22])),
f[11] = -1.*f[22]-4.,
f[12] = -(1.*(f[22]^2+4.*f[22]-27.))/f[21],
f[20] = f[20],
f[21] = f[21],
f[22] = f[22]}

clearly the first three variables are dependant, and the latter three are independant. I'd like to graph the first three as the latter three vary between bounds and then colour the points on the output based on where they came from in the input, so i can get some intuition about what these equations mean.
 

Consider f is a polynomial which is constructed from some polynomials. In other words, f=g_1^{k_1}*g_2^{k_2}*...*g_n^{k_n} where  g_1,g_2,..,g_n are some polynomials and also  k_1,k_2,..,k_n are positive integer numbers.

My question: How to define a procedure such that the output of proc(f) is the following list [g_1 , g_2 , ... g_n]. In fact, the procedure separates the factors of the polynomial f into  a list and also removes the powers of the factors. 

For example, suppose that f=x*(x+1)^4*(x^2+x+1)*(x^3+x^2+1)^5. Then, the output of the proc(f) be as follows [x , x+1 , x^2+x+1 , x^3+x^2+1].

Thanks in advance

An n*n matrix A is called an MDS matrix over an arbitrary field if all determinant of square sub-matrices of A are non-zero over the field. It is not difficult to prove that the number of all square sub-matrices of A is binomial(2*n, n)-1. The code that I use to check whether A is an MDS matrix is in the following form 

 u := 1;
 for k to n do
 P := choose(n, k);
   for i to nops(P) do
    for j to nops(P) do
         F := A(P[i], P[j]);
         r := Determinant(F);
        if r = 0 then

           u := 0; k:=n+1;

            i := nops(P)+1; j := nops(P)+1;

        end if;

    end do;

      end do; 
   if u = 1 then

      print(A is an MDS Matrix) 

   end if; 
  end do:

When I run the mentioned code for n=16, it takes long time since we need to check binomial(32, 16)-1=601080389 cases to verify that A is an MDS matrix or not. 

My Question: Is there a modified procedure which can be used to check that an n*n matrix is  whether an MDS matrix for n>=16. 


 

1 2 3 4 5 6 7 Last Page 1 of 58