MaplePrimes Questions

How I can solve the error in maple which is ( (in PDEtools:-DeterminingPDE) expected the number of infinitesimals (4) to be equal to the sum of the number of independent (2) and dependent (1) variables; received: 4 <> 2 + 1)

X is a real random matrix of dimension n; its entries are i.i.d. variables.

They follow the standard normal law N(0,1).

I want to write a big sample. For that, I use the following two lines:

roll := RandomVariable(Normal(0, 1))

X := Matrix(n, proc (i, j) options operator, arrow; (Sample(roll))(1)[1] end proc)

Is there a method that does the calculations faster ??

Thanks in advance.

How to plot the second order derivative and first oder derivatives plot in time dependent pde and vector plot of  theta(y,t), u(y,t) at y=0..10 and t=0..1

nowhere i found a vector plot of time-dependent pde 

how to plot give me suggestions.

in vector plots, flow patterns should show with arrow marks

  restart;
  inf:=10:
  pdes:= diff(u(y,t),t)-xi*diff(u(y,t),y)=diff(u(y,t),y$2)/(1+lambda__t)+Gr*theta(y,t)+Gc*C(y,t)-M*u(y,t)-K*u(y,t),
         diff(theta(y,t),t)-xi*diff(theta(y,t),y)=1/Pr*diff(theta(y,t),y$2)+phi*theta(y,t),
         diff(C(y,t),t)-xi*diff(C(y,t),y)=1/Sc*diff(C(y,t),y$2)-delta*C(y,t)+nu*theta(y,t):
  conds:= u(y,0)=0, theta(y,0)=0, C(y,0)=0,
          u(0,t)=0, D[1](theta)(0,t)=-1, D[1](C)(0,t)=-1,
          u(inf,t)=0, theta(inf,t)=0, C(inf,t)=0:
  pars:= { Gr=1, Gc=1, M=1, nu=1, lambda__t=0.5,
           Sc=0.78, delta=0.1, phi=0.5, K=0.5, xi=0.5
         }        

{Gc = 1, Gr = 1, K = .5, M = 1, Sc = .78, delta = .1, nu = 1, phi = .5, xi = .5, lambda__t = .5}

(1)

  PrVals:=[0.71, 1.00, 3.00, 7.00]:
  colors:=[red, green, blue, black]:
  for j from 1 to numelems(PrVals) do
      pars1:=`union`( pars, {Pr=PrVals[j]}):
      pdSol:= pdsolve( eval([pdes], pars1),
                       eval([conds], pars1),
                       numeric
                     );
      plt[j]:=pdSol:-plot( diff(u(y,t),y), y=0, t=0..2, numpoints=200, color=colors[j]);
  od:
  plots:-display( [seq(plt[j], j=1..numelems(PrVals))]);

 

PrVals := [.71, 1.00, 3.00, 7.00]; colors := [red, green, blue, black]; for j to numelems(PrVals) do pars1 := `union`(pars, {Pr = PrVals[j]}); pdSol := pdsolve(eval([pdes], pars1), eval([conds], pars1), numeric); plt[j] := pdSol:-plot(diff(u(y, t), y, y), y = 0, t = 0 .. 2, numpoints = 200, color = colors[j]) end do; plots:-display([seq(plt[j], j = 1 .. numelems(PrVals))])

 
 

 

Download badPDE.mw

I would like to create a database of component information. I have previously done this using a table which is indexed by the part number. Each element is a DataFrame, which includes several items with values and at least 2 DataFrames. The 2 DataFrames are extracted from a Spreadsheet with 2 tabs, that is stored in a Maple Workbook. Each DataFrame has an name for the row and 2 columns; Description and Value. The Description is text and the value is a single value or 3-element list with unit. Such at [9, 10, 11]*~Unit('ohm')

Anyway, I'm wondering if this is the most efficient way. I'm also wondering if there is a way to create such a database so it can be used with other software tools, primarily Mathcad and Excel.

Thanks

The code generting module C writes  result to screen. How to I get it to file?

Dear Users!

I hope everyone is fine here. I have the following functions:

f := cos(t)*sin(x)-sin(x)+(1/2)*sin(x)*t^2-(1/24)*sin(x)*t^4

I want to plot the contour plots with legends like given as (this is the countor plot just for reference):

I want the same coloring to fill the contour plots. Kindly help me to resolve my problem. Thanks in advances

(I would prefer a solution for Maple 2015, but answers relative to newer versions are welcome)

Is there a simple way to force the result -y(1) + y(2) without using one of these two tricks?

# how can I get the expression of
int(diff(y(x), x), x=1..2);
                      / d                  \
                   int|--- y(x), x = 1 .. 2|
                      \ dx                 /

# Trick 1
int(diff(y(x), x), x);
eval(%, x=2)-eval(%, x=1)
                              y(x)
                          -y(1) + y(2)

# Trick 2
J := Int(diff(y(x), x), x = 1..2): 
value(IntegrationTools:-Parts(J, 1));
                          -y(1) + y(2)

TIA

I found this option in an API command ?MapleSim,LinkModel,Simulate:

    scalemethod : one of the following: "none", "minimum", "maximum", "geometric"
    Method of variable scaling applied to the system.

I did not find anything about scaling in Maples help system.

What exactly does the scaling do?

According to the help page for optimize

"The optimize function makes use of Maple's option remember facility to identify common subexpressions in linear time and space. This means, however, that only those subexpressions which Maple has simplified to be identical are found. For example, the expression 
                            "x + y"

 is not recognized as being common to  
                          "x + y + z"

. That is, optimize performs mainly "syntactic" optimizations."

Is there a way to more efficiently calculate a set of expressions that have common factors as in the example above?

 In the memory leak problem with my DStarLepNu simulation program, I did find one cause in that due to normalization errors the accept/reject algorithm in ‘PickAngles’ was executed too many times. This should have just made angle generation inefficient but occasionally, but not always produced very big memory bumps when a large number of trials were needed to pick angles. It’s not clear why these bumps occurred as the code being executed is always the same and is simple.

Fixing this did however not prevent memory crashes or even reduce them much.

I have since turned off accept/rej and calls to ‘arccos’ and more modest spikes remain and crashes still occur!

I don’t understand how Maple memory management works. My B-meson decay prov ‘bDecay’ usually gives  still shows occasional spikes and and there’s a weird correlation between the first (B1) and second (B2) call:

 

DStar3DKinRecoLoopDebugCombo200EventsExportRun2.mw

 

çMemory added by ‘bDecay’ proc on 1st call vs 2nd call in the B1-B2 event loop..

èWhat with the slope and difference in width?

can you help to solve and plot the followng delay ODE

ode:=diff(y(x),x)=1-2*y(x/2)^2;                                                                                                                                                            ics := y(0) = 2    ;            y3:= dsolve({ics, ode},numeric, delaymax = 1.7);  YY5:=odeplot(y3,x=0..10); 

I found the option in this statement

dsn := dsolve(dsys, numeric, differential = true, projection = false, maxfun = 0)

in help("examples/numeric_DAE")

 

I give up searching because

  • the word "differential" occurs so often in dsolve help pages that advanced search does of not filter help topics effectively
  • the option does not seem to be a dsolve[numeric] or rk45 specific option (at least I cannot find anything on the pages)

What does the option do?
How could I have searched better?

How do I set the axis range in a Maple scatter plot. It's not evident to me from the Help.

Please help me how to impliment to solve this problem 

Download dust_practice_code.mw

dust_paper.pdf

Dear Users!

I hope everyone is fine. I want to plot the following sequence in 3d for t=0..1 and x=-pi..pi;

[0., 0.4995839572e-1*sin(x), 0.9966865249e-1*sin(x), .1488899476*sin(x), .1973955598*sin(x), .2449786631*sin(x), .2914567945*sin(x), .3366748194*sin(x), .3805063771*sin(x), .4228539261*sin(x), .4636476090*sin(x), .5028432109*sin(x), .5404195003*sin(x), .5763752206*sin(x), .6107259644*sin(x), .6435011088*sin(x), .6747409422*sin(x), .7044940642*sin(x), .7328151018*sin(x), .7597627549*sin(x), .7853981634*sin(x)];

In the sequence first entry (0) for t=0, second (0.4995839572e-1*sin(x)) for t=0.05, third (0.9966865249e-1*sin(x)) for t= 0.1 and so on the last entry (.7853981634*sin(x)) for t=1. In addition, how do I plot if the number of points exceeds in the sequence for example 100 or 1000 points, but the difference between two consecutive values for t is the same here the difference is Delta*t=0.05.

First 42 43 44 45 46 47 48 Last Page 44 of 2308