Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

 

Why I could not unaasign U_hat in my following program?


 

``

restart

II := 1:

qq := 2:

M := 2:

seq(seq(seq(assign(U[i, j, m], h*`#mover(mi("U"),mo("&uminus0;"))`[i, j, m]), i = 0 .. qq), j = 0 .. qq), m = 1 .. 22)

`#mover(mi("U"),mo("&uminus0;"))` := Array(0 .. II, 0 .. JJ, 1 .. M):

Um[1, 1] := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 2, (2, 1) = 3, (2, 2) = 4}); Um[1, 2] := Matrix(2, 2, {(1, 1) = 5, (1, 2) = 6, (2, 1) = 7, (2, 2) = 8})

``

for m to M do `#mover(mi("U"),mo("&uminus0;"))`[0 .. II, 0 .. JJ, m] := ArrayTools:-Alias(Um[1, m], [0 .. II, 0 .. JJ]) end do:

``

for i from 0 to qq do for j from 0 to qq do for m to 22 do `#mover(mi("U"),mo("&uminus0;"))`[i, j, m] := unassign('`#mover(mi("U"),mo("&uminus0;"))`[i, j, m]') end do end do end do

Error, (in unassign/indexed) arguments of type `indexed' must refer to tables or arrays

 

``


 

Download moshkel.mw

Here is a simple little procedure that does not work

et :=proc(x) 

description   "this is a variant of evalf that gets rid of almost 0 nos.(rounding error) and shortens the display to 2 `digits"`;  

if  abs(x) < 10^((-14))  then 0 else  evalf(x,2) end if     end proc;


Error, unable to delimit strings/identifiers


and here is the same procedure that works because I added the # before the description.

et :=proc(x)

# description   "this is a variant of evalf that gets rid of almost 0 nos.(rounding error) and shortens the display to 2 `digits"`;  

if  abs(x) < 10^((-14))  then 0 else  evalf(x,2) end if     end proc;

 

In the help pages they do not say that the description must be hidden by the # sign (nor do they mention that quotes should be used although they are used in the examples.

 

What am I missing?

 

 

 

How can I activate my maple 13?

I have no activatIon left but installed maple

once

My purchase Code is BNN7VMT4BPFN7ESG

Thank. You 

Hi,

Is there any one can tell me how to plot a curve(e.g f(x,1)=2x^2-x-1) by the command spacecurve?

Thanks in advance!

I would like to compute the function 

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

for very large real values of x. However, in the following plot it can be seen that there are already strong numerical instabilities for x>33. What can I do to reach more stability for large x? Or, does somebody know how to get a closed form asymptotic expression for large x?

 

I am working on a simple set of notes for students. Much of the on-line stuff is either out-of-date or too complex.

Here is the problem I wish to show

A corpse was found in a room with an ambient temperature of 64°F. The body temperature on finding the corpse was 75°F; one hour later it was 73°F. Use Newtons Law of cooling to find the time of death.

Here is my solution. I realise the assignment to variable cool is not used. Please tell me any suggestions for improvements.

many thanks


Hi,


When you do this a := plot(1/x, x=0..1);  the figure contains a "smart" graph which extends roughly from 0 to 30 in the vertical direction.
(no discont=true nor smartview=false used here, numpoints set to its default falue)

If you use plottools:-getdata(a); you find that the vertical range is about  0..1800.
It seems to mean that smartview=true (the default setting) overrides the range determined from the values of discont and numpoints?
 

My question is: Is it possible to retrieve the vertical range that plot uses when it displays the graph?
 

Dear all,

I need your help to compute the multiplicative  group generated by the following two matrices.

A :=  Matrix(2, 2, [[2, 0], [0, 1]]) ;

B := Matrix(2, 2, [[1, 1], [0, 1]]) ;

 such that A.B different to B.A

many thanks

 

Hello Dr/Pof/Colleague

Please help me on the ODE BVP problem

my target i want RUN double loop


 

restart

with(plots)

b := 0; c := 0; k[1] := 1; k[2] := 0; Un := 0; d := 0

Eq1 := (101-100*lambda)*(1+a*phi(eta))*(diff(f(eta), `$`(eta, 3)))+(diff(f(eta), `$`(eta, 2)))*(f(eta)+g(eta)+a*(diff(phi(eta), eta)))-(diff(f(eta), eta))^2+k[2]+Un*(k[2]-(1/2)*eta*(diff(f(eta), `$`(eta, 2)))-(diff(f(eta), eta))) = 0

(101-100*lambda)*(1+a*phi(eta))*(diff(diff(diff(f(eta), eta), eta), eta))+(diff(diff(f(eta), eta), eta))*(f(eta)+g(eta)+a*(diff(phi(eta), eta)))-(diff(f(eta), eta))^2 = 0

(1)

Eq2 := (101-100*lambda)*(1+a*phi(eta))*(diff(g(eta), `$`(eta, 3)))+(diff(g(eta), `$`(eta, 2)))*(f(eta)+g(eta)+a*(diff(phi(eta), eta)))-(diff(g(eta), eta))^2+k[2]+Un*(k[2]-(1/2)*eta*(diff(g(eta), `$`(eta, 2)))-(diff(g(eta), eta))) = 0

(101-100*lambda)*(1+a*phi(eta))*(diff(diff(diff(g(eta), eta), eta), eta))+(diff(diff(g(eta), eta), eta))*(f(eta)+g(eta)+a*(diff(phi(eta), eta)))-(diff(g(eta), eta))^2 = 0

(2)

NULL

Valpha := [0, .1, .2]; Va := [0, 0]

etainf := 100

bcs := (D(f))(0) = k[1], (D(g))(0) = alpha, f(0) = 0, g(0) = 0, (D(f))(etainf) = k[2], (D(g))(etainf) = k[2]

(D(f))(0) = 1, (D(g))(0) = alpha, f(0) = 0, g(0) = 0, (D(f))(100) = 0, (D(g))(100) = 0

(3)

dsys := {Eq1, Eq2, bcs}

for j to 2 do for i to 3 do a := Va[j]; alpha := Valpha[i]; dsol[j][i] := dsolve(dsys, numeric, continuation = lambda); print(alpha); print(a); print(dsol[j][i](0)) end do end do

Error, incorrect number of arguments to _Inert_FORFROM

"for j from 1 to 2 do   for i from 1 to 3 do a:=Va[j]; alpha:=Valpha[i];  dsol[j][i]:=dsolve(dsys,numeric, continuation=lambda);  print(alpha);    print(a);  print(dsol[j][i](0));  od  end"

 

NULL

 


 

Download 3DAKc2alpha.mw

Here is a simple collection of Python scripts that allows Maple code to be embedded directly within a LaTeX document. The scripts will process the LaTeX document, calling Maple as required, making the Maple output directly accessible in the LaTeX document. The source, including extensive examples, can be found at https://github.com/leo-brewin/hybrid-latex. This  library also supports inclusion of active Mathematica, Matlab, Python and Cadabra code within LaTeX documents.

Here is a simple example (based on maple/example-01 in the GitHub site)

\documentclass[12pt]{mpllatex}

\begin{document}

\section*{Calculus}

\begin{maple}
   ans := diff(x*sin(x),x):                          # mpl (ans.501,ans)
   ans := eval(diff(x*sin(x),x),x=Pi/4):             # mpl (ans.502,ans)
   ans := int(2*sin(x)^2, x=a..b):                   # mpl (ans.503,ans)
   ans := int(2*exp(-x^2),x=0..infinity):            # mpl (ans.504,ans)
   ans := ''int(2*exp(-x^2),x=0..infinity)'':        # mpl (lhs.504,ans)
   ans := int(int(x^2 + y^2,  y=0..x),x=0..1):       # mpl (ans.505,ans)
   ans := ''int(int(x^2 + y^2,  y=0..x),x=0..1)'':   # mpl (lhs.505,ans)
\end{maple}

\begin{align*}
   &\mpl*{ans.501}\\
   &\mpl*{ans.502}\\
   &\mpl*{ans.503}\\
   \mpl{lhs.504}&=\Mpl{ans.504}\\
   \mpl{lhs.505}&=\Mpl{ans.505}
\end{align*}

\end{document}

and here is the corresponding output

example-01.pdf

 

Hi all,

I need any help for the following question:

restart;
H :=n ->sum(1/k, k = 1 .. n) ;

If you computational devices has only 16 decimal points of accuracy, does computing H(n) for n greater than 10^16 give  any information about the series;

Many thanks

Hi,

     I am new to Maple and my task is to find an analytical solution of Lateral Vibrations of Beams. Even though I referred this forum to get an idea about solving a fourth order ODE bvp,I still couldn't find the solution. Although a non trivial solution exists for this case, Maple is still returning a trivial output(i.e the determinant is not returning zero). I need to find the value of constants C1 to C4 but I am unable to understand what the error is. I have attached the file containing my current solution below.

SOP2.mw

Any help will be appreciated,

Kind Regards,

Ajay

 

 

how can i determain the drawing dimensions ( length and width), if i want to draw two graphs of the same dimensions?

let
expression := {{a*x}, {{(b*y)}/3}, {a*b}, {log(x+y)}, {3*x}};

I would like to convert the above expression as
 

requiredForm :={a*x, (b*y)/3, a*b, log(x+y), 3*x};

I observed that the function convert can do some convertion but have to use second argument + or *. which causes unstable results.

One method I found is to convert the expression to string and remove "{}" using StringTools:-Remove function.
I would like to know if its possible to do with out converting to String.

result:= convert(expression, `+`);

                                    /1      \              
  
result:= {a b} + {a x} + {3 x} + { - {b y} } + {ln(x + y)}
                                    \3      /            
  

is there anyway I can get the requiredForm

First 638 639 640 641 642 643 644 Last Page 640 of 2097