Maple 17 Questions and Posts

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

What is going on here?

cos/sin != cot???

Hi everybody,

Suppose that in an equation, I have the term x/(t).  I want to substitute it by v(t).  Any suggestion because I am trying but don't find an help page on this.

 

Thank you in advance for your help!

 

--------------------------------------
Mario Lemelin
Maple 17.01 Ubuntu 13.10 - 64 bits
Maple 17 Win 7 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

Hi MaplePrimers!

I have a simulation in MapleSIM, exported as a compiled procedure in maple using -LinkModel(), and -GetCompiledProc.

I'm trying to do parameter estimation on my MapleSIM model.  Within a optimization scheme, I call the MapleSIM model, and it will output a curve.  Using a least squares method, I compare this measurements to synthetic experimental data (I know the actual values), and generate an objective function.  The optimization algorithm will try different parameter values, and try to minimze the objective function.  When the curves are exactly the same, the objective function will be zero.

The problem I am having is certain parameter sets will cause the model to require very small steps.  I wish to put a timeout on these experiments, because speed is important.  However, I would also like to see the results up to the point of requiring very small steps.  For timeout, I was using code along the lines of:

out:= timelimit(30,cProc(params = PData)); #simulate with 30s limit

where PData are the parameter guessses, and cProc is the compiled MapleSim model.

I would like 'out' to be assigned whatever the results were after 30 seconds, even if the model had not finished integrating.

 

Thanks in advance for any help!

I am trying to solve a set of equations for a Fluid dynamics problem and I cannot get a result...Any ideas why?

rho := 1.184;
nu := 1.562*10^(-5);
ID := .15;
L := 24.5;
Kl := 12.69;
Ho := 50.52;
a := 2.1*10^(-5);
E := 0.1e-2; alpha := 1.05;

sys := {Re = ID*V/nu, hl = (f*L/ID+Kl)*V^2/(2*9.81), Vflow = (1/4)*Pi*ID^2*V, Hrequired = alpha*V^2/(2*9.81)+hl, Hrequired = -a*Vflow^2+Ho, 1/sqrt(f) = -1.8*log[10](6.9/Re+(E/(3.7))^1.11)};

solve(sys*{Re, V, f, hl, Vflow, Hrequired});
%;
Error, (in unknown) invalid input: Utilities:-SetEquations expects its 2nd argument, equations, to be of type set({boolean, algebraic, relation}), but received {{Re = (9603072983/1000000)*V, hl = (5096839959/100000000000)*((1633333333/10000000)*f+1269/100)*V^2, Vflow = (9/1600)*Pi*V, Hrequired = (5351681957/100000000000)*V^2+hl, Hrequired = -(21/1000000)*Vflow^2+1263/25, 1/f^(1/2) = -(9/5)*ln((69/10)/Re+27367561/250000000000)/ln(10)}}

 

Dear All,

 

I have a .txt file with a single line. I tried to import it using ImportMatrix commnad (e.g. ImportMatrix(filename)) but always got the incomplete data, 

I attach the file for further reference:

ConservationEq.txt 

 

Anything I am missing ?

 

Regards,

 

Satya

I know how to define a procedure and use print() as follows:

test := proc (x)
  print("x is equal to: ");
  x
end proc

This displays as follows:
test(2)

"x is equal to: "

2

But i would like to appear as follows:

x is equal to: 2

 

Where the "x is equal to: "-part is standard a "text-mode-block" with green color.

Can i accomplish this in Maple, and can i do more advanced formatting?

 

Best regards,

Martin

I work entitled Point Exeter made ​​for Fast VII workshop on applied and computational mathematics 2014 Trujillo Peru.

  Punto_de_Exeter.mw   (version in spanish)

Atte.

Lenin Araujo Castillo

Physics Pure

Computer Science

 

How can I get maple to integrate this expression numerically.

For a specific value 0<s<1 it should be enough to integrate from -40..40 instead of -infinity..infinity

Anyway. My maple version always hangs up :-(

(1/2)*(-4*dilog(-(exp(2*t)*s-(-s^2+1)^(1/2)+1)/(-1+(-s^2+1)^(1/2)))*exp(4*t)+arctanh((-1+s)/(-s^2+1)^(1/2))*s^2+arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*s^2+8*(-s^2+1)^(1/2)*exp(4*t)+4*dilog((exp(2*t)*s+(-s^2+1)^(1/2)+1)/(1+(-s^2+1)^(1/2)))*exp(4*t)+4*exp(4*t)*arctanh((-1+s)/(-s^2+1)^(1/2))-8*arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*exp(4*t)*s^2*t-4*ln(1+(-s^2+1)^(1/2))*exp(4*t)*s^2*t+4*ln(1-(-s^2+1)^(1/2))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(8*t)*s^2-2*arctanh((-s^2+1)^(1/2)/(1+s))*exp(8*t)*s^2+4*(-s^2+1)^(1/2)*exp(6*t)*s-8*arctanh((-s^2+1)^(1/2)/(1+s))*exp(6*t)*s+2*(-s^2+1)^(1/2)*exp(4*t)*s^2-4*arctanh((-s^2+1)^(1/2)/(1+s))*exp(4*t)*s^2+4*(-s^2+1)^(1/2)*exp(4*t)-8*arctanh((-s^2+1)^(1/2)/(1+s))*exp(4*t)+4*(-s^2+1)^(1/2)*exp(2*t)*s-8*arctanh((-s^2+1)^(1/2)/(1+s))*exp(2*t)*s+(-s^2+1)^(1/2)*s^2-2*arctanh((-s^2+1)^(1/2)/(1+s))*s^2)

Looking at the code of PDEtools:-declare, one sees that it does some brief initializing and then passes the job off to `PDEtools/declare`. I'd like to view this latter procedure, but I can't find it. It is not at the top level, nor is it an export or local of module PDEtools. So where is it?

Please, I solved a pde system of equation problem numerically, using maple 17.

But I dont know how to plot multiple solutions on one graph.

I want to vary one of the parameters....

e.g Pr=0.71, Pr=7, Pr=10 where other parameters are kept constant

 

My working is attachedtobi_msc_solution.mw

restart

M := 1:

pde1 := diff(u(y, t), t)+Typesetting:-delayDotProduct(S, diff(u(y, t), y))-2*k^2*u(y, t) = diff(u(y, t), y, y)+theta(y, t)+Typesetting:-delayDotProduct(N, C(y, t))+Typesetting:-delayDotProduct(M, u(y, t))+u(y, t)/K:

                pde2 := theta(y, t)+t*(diff(theta(y, t), t))+S*(diff(theta(y, t), y)) = (diff(theta(y, t), y, y))/Pr-Typesetting:-delayDotProduct(alpha, theta(y, t)):

pde3 := C(y, t)+t*(diff(C(y, t), t))+S*(diff(C(y, t), y)) = (diff(C(y, t), y, y))/Sh-Typesetting:-delayDotProduct(R, C(y, t)):

PDE := {pde1, pde2, pde3}:

IBC := {C(0, t) = 1, C(1, t) = 0, C(y, 0) = 0, u(0, t) = 0, u(1, t) = 0, u(y, 0) = 0, theta(0, t) = 1, theta(1, t) = 0, theta(y, 0) = 0}:

pds := pdsolve(PDE, IBC, numeric)

module () local INFO; export plot, plot3d, animate, value, settings; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; end module

(1)

pds:-plot[display](u(y, t), t = .5, linestyle = "solid", colour = "blue", legend = "Pr=0.71", title = "Velocity Profile", labels = ["y", "theta"])

 

``


Download tobi_msc_solution.mw

 

Please, Any help will be gracefully appreciated

 

hi, i have a problem with maple. i took the codes from a book, it should be true but even i copied and past exactly the same, again the maple gave me error which i couldnt solve. could you please help me? how can i correct it ? incorrect codes are below, but if you need all codes i can write here. i need a solution immediately :(

>relativefrequencies := proc(text, language)
evalf(frequencies(text, language)/StringTools:-Length(text))
end proc:
VigenereKeyFind := proc(ciphertext, max:=floor(StringTools:-Length(ciphertext)/15),
{language:=en})
uses StringTools;
local freqs;
freqs := map(x -> relativefrequencies(x, language),
map(Implode, partit(Explode(ciphertext),
keylength(ciphertext, max, ’:-language’=language))));
Implode(map(li -> frequencyanalysis(li, ’:-language’=language), freqs))
end proc;

>VigenereKeyFind(c);
Error, (in VigenereKeyFind) ``&rsquo;`` does not evaluate to a module

Hi all, 

I am quite new to maple. Thanks for your help in advance. 

Could I define a general function f of a single variable x, f(x), without specifying its explicit form? I know it is simple to define functions of specific forms, e.g., f(x)=2*x (In maple: f:=x->2*x). I try to define a function without knowing its form, e.g., f:=x->f(x), expecting maple return f(y) if I type >>f(y). But this does not work (Maple says:

Error, (in temp) too many levels of recursion). 

 

Is it possible to define a general function f(x) without specific form in maple? Thank you again. 

A friend asked me a question and I didn't know the answer to give him. So I decided to share the question with you guys. According to him, Is there an inbuilt function in maple that we can use to specify "time" on a worksheet/document? What the time does is to run or execute the worksheet/document at the time stipulated. Meaning in his absense, he wants maple to run a particular worksheet at a particular time which he will decide.Hope my question is sensible?

Thanks to the community through Maplesoft Mapleprimes that could develop in Computational Mathematics Achievement Day at our institution.

First 40 41 42 43 44 45 46 Last Page 42 of 61