MaplePrimes Questions

Hi all, how to replace

I use but not work!

I am generating a lot of random graphs in Maple, and I need to generate the LaTeX code for these graphs. It has been working very well, until now, when I got to weighted graphs. The LaTeX code does not create the weights. I know I can modify the code to add the weights, but my question is two-fold: why aren't the weights automatically generated? is it possible to have the weight automatically generated, how? Nothing in the documentation appears to address these issues.

 

An example of what I attempting to do is in the attached worksheet.

Thanks!

graph.mw

Hello everyone, I am studying to be an engineer  and I have created this document, where I both write lots of notes and make a lot of exercises. 

Suddenly my document crashed and I got this message "There were problems during the loading process. Your worksheet may be incomplete."

I have made sections for each lection - we have had 5 in total for now, but my documents only loads 2.. :(

I see that @Joe Riel has fixed a similiar problem, but I just can't figure it out myself :(

Hope anyone can help

PS. my document is in danish but there should be 5 sections where Maple only loads 2..

Edit: for some reason I can't upload my maple-file.... I'll try again later

This is a follow up question to https://mapleprimes.com/questions/225877-Partial-Integration-Hint:

restart;

with(Physics, KroneckerDelta);

Digits := 15;

t4 := 1/3;

n := 4;

q := 4/7;

i1 := evalf(Int(t^n*exp(-t)*GAMMA(2*q-2, t*(1-t4)*(1/t4)), t = 0 .. infinity, method = _d01amc));

i2 := expand(simplify(GAMMA(2*q-2)*add(binomial(n, m)*(KroneckerDelta[m, 0]-GAMMA(3-2*q)*(1/GAMMA(3-2*q-m))*t4^m*(1-t4)^(2*q-2))*(-1)^m*factorial(n-m), m = 0 .. n)));

`~`[evalf]([op(i2)]);

add(%);

i3 := expand(simplify(eval((-1)^n*GAMMA(2*q-2)*(diff((1-(1+t4*x*(1/(1-t4)))^(2-2*q))*(1/x), x$n)), x = 1)));

`~`[evalf]([op(i3)]);

add(%)

 

Interestingly this works up to n=3. It seems that the second term is wrongly manipulated and it should be 168/6 instead of 175/6?

 

I doubt the derivatives are wrong since I checked individually. I also hardly doubt this is a numerical round off, as the discrepancy is too large.

Is this a bug, or is there actually an error?

Why can't maple integrate

restart;
`assuming`([int(GAMMA(a, s)*exp(-b*s), s = 0 .. infinity)], [b > 0, a > 0])

which has a simple result obtained by partial integration?

Is het possible to use the circletimes symbol  ⊗ from Maple's Operators palette as an alias for KroneckerProduct(A,B)?

Instead of KroneckerProduct(A,B) :  A ⊗ B

An abbriviation would be convenient for the following expression:

A ⊗ B ⊗ C ⊗ D ⊗ E ⊗ F ⊗ G

 

I tried alias, macro, applyrule but was not successfull.

Is is possible or should I add it to the Maple 2019 wishlist?

Harry

 

Is there information available about the improvements made up to the recent version of the Maple Physics Package?

Is there any way in maple to solve this to give answer back to plaintext from cipher-text.

toletter := proc (num) local cs, cn, sl, ltable, ans, ii; ltable := table([0 = "A", 1 = "B", 2 = "C", 3 = "D", 4 = "E", 5 = "F", 6 = "G", 7 = "H", 8 = "I", 9 = "J", 10 = "K", 11 = "L", 12 = "M", 13 = "N", 14 = "O", 15 = "P", 16 = "Q", 17 = "R", 18 = "S", 19 = "T", 20 = "U", 21 = "V", 22 = "W", 23 = "X", 24 = "Y", 25 = "Z"]); cn := num; sl := floor((1/2)*trunc(evalf(log10(cn))))+1; ans := " "; for ii to sl do cn := (1/100)*cn; cs := ltatble[100*frac(cn)]; ans := cat(cs, ans); cn := trunc(cn) end do; RETURN(ans) end proc

This is because of the answer that I get is not in letter form:

toletter(plaintext);
(ltatble[17]) || (ltatble[4]) || (ltatble[19]) || (ltatble[20]) || 

  (ltatble[17]) || (ltatble[13]) || (ltatble[19]) || (ltatble[14]

  ) || (ltatble[12]) || (ltatble[0]) || (ltatble[8]) || (ltatble[

  13]) || (ltatble[3]) || (ltatble[4]) || (ltatble[2]) || (

  ltatble[10]) || " "
 

Is there any way in maple to solve this;

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

To find the value of theta.

theta.mw

i've come across a confusing behavior where the same command (a copy/paste of another command) is giving an output in a a different form.

Attaching a screen shot that shows this. Eq 6.8 is executed just after 6.7.

(i know the command is weird, i.e. subs(beta=beta, ..), etc.. this is part of some larger code base and i just put this in when trying to undertand what's going on).

I would hope for the same command to spit out the same output in this case. (nothing else gets assigned/called in betwen).

any idea what's going on?

 

i'm on maple 2018.2 on linux.

thanks

 

 

I vaguely recall others complain about disappearing Code Edit Regions. Does anyone else recall that? I had one disappear from the very top of the attached worksheet (right after the restart), causing me to lose about 15-30 minutes of work. I've totally recreated the work, so I have no interest in this worksheet being repaired. I'm merely posting it in case anyone wants to do an autopsy on it.

Another issue that happened twice with this worksheet is that when I unchecked the "Expanded" box on the Code Edit Region menu (pull out from the right side of the screen) and copied the text to my clipboard (for posting on MaplePrimes), that copied text was missing my most-recent changes to the code. They reappeared when I expanded again. (But it's really difficult to copy-and-paste a multi-screen Code Edit Region when it's expanded.)

My final issue (and this has bothered me for years), is how the heck are you supposed to find the line with the syntax error in a several-hundred-line Code Edit Region? Unlike with inline code, the cursor is not placed near the error location._Binomial_missing_Code_region.mw

How do I remove infinity from a list

s:=[f(x) , exp(a), GAMMA(2x)-1 , infinity , 1, -infinity]

remove(has,%,infinity)

does not work.

It should yield

s:=[f(x) , exp(a), GAMMA(2x)-1 , 1]


 

with(StringTools)

s := "xABCx etc"; RegMatch("x(.+)x", s, 'm', 'n'); m; n; RegSubs(m = n, s)

"xABCx etc"

 

true

 

"xABCx"

 

"ABC"

 

"ABC etc"

(1)

s := "(ABC) etc"; RegMatch("\\((.+)\\)", s, 'm', 'n'); m; n; RegSubs(m = n, s)

"(ABC) etc"

 

true

 

"(ABC)"

 

"ABC"

 

"(ABC) etc"

(2)

``

In the second case RegSubs treats the expression m as containing special characters. Can one tell it to treat what it receives as a literal string - perhaps some "escape" function?
 

Download regsubs_problem.mw

EDIT  There is such a function. suffices.

 

How to solve the following second order ODE system? (I want to solve analytically and numerically and to compare the results) Thanks. Best regards.

 

where

Initial conditions:

Other symbols in the equation (v_0,a_0 etc.) are constant.

MY CODE TRY:  Code.mw

I tried to write a code for matrices in the question. ( I used x instead of gamma in the code)

restart:
n:=2:
  M:= tau -> Matrix
      ( n,
        n,
        shape=identity
      )
      +Matrix
      ( n,
        n,             (i,j)->2*x*sin(i*Pi*v_0*tau)*sin(j*Pi*v_0*tau)
            ):
  C:=tau -> Matrix
              ( n,
                n,
                (i,j)->4*(i*Pi*v_0*tau)*sin(i*Pi*v_0*tau)*cos(j*Pi*v_0*tau)
              ):
  K:=tau -> n^4*Pi^2* Matrix
      ( n,
        n,
        shape=identity
      )-Matrix
      ( n,
        n,
        (i,j)-> 2*mu*(i*Pi*v_0)^2*sin(i*Pi*v_0*tau)*sin(j*Pi*v_0*tau)+2*mu*(i*Pi*a_0)*sin(i*Pi*v_0*tau)*cos(j*Pi*v_0*tau)
      ):
f:=tau -> Vector
      ( n,
        (i,j)-> x*Pi^2*(Pi/2+v_0^2*sum(((1-(-1)^k)/k^3)*sin(k*Pi*v_0*tau),k=1..infinity)-a_0*sum(((1-(-1)^k)/k^4)*cos(k*Pi*v_0*tau),k=1..infinity))*sin(i*Pi*v_0*tau)
      ):
      
 
X:= Vector(n, i-> x[i](t)): 
sys:= M(tau).diff~(X, tau$2)+C(tau).diff~(X, tau)+K(tau).X=f(tau):









 

how I can determined time period?

thank you

period.mw
 

d := (10+20*cos(Omega*t)+30*cos(9*sqrt(2)*t))^2

(10+20*cos(Omega*t)+30*cos(9*2^(1/2)*t))^2

(1)

with(StringTools)

period(d)

period((10+20*cos(Omega*t)+30*cos(9*2^(1/2)*t))^2)

(2)

``


 

Download period.mw

 

First 759 760 761 762 763 764 765 Last Page 761 of 2432