MaplePrimes Questions

I think   looks much nicer than

it is indeed the answer to .  Both above are equal but there are less terms on the left.  It's just what Maple does - it doesn't like radicals in the denominator.  For just a little overhead I would prefer a collection of any sqrt value into the denominator than to have to split it up.  Maybe just my preference.  Perhaps an option could be available within the Maple system to allow numeric radicals in the denominator? 

Hello,

I'm wondering which connection formulas maple has access to?

For instance consider the following exmple

restart;

hypergeom([a, b], [c], 1);

`assuming`([convert(%, GAMMA)], [c-a-b > 0])

 

it should be simplified to GAMMA functions, but I do not get maple to do it. Are there packages for this?

 

Same for higher functions pFq for example

hypergeom([1, 1, 2*q-2+L], [2, L+1], 1)

under appropriate assumptions.

Hello,
I want to collect a function into terms without using ?expand() since this expands everything which I dont want.


f:=GAMMA(L+2*q-3-k)/(GAMMA(L-k)*k)*((GAMMA(-2*q+L)*GAMMA(L+2*q-3-k)-GAMMA(L+2*q-3)*GAMMA(L-2*q-1-k)*(L+2*k-1-(4*k+2)*q))/((2*(-1+2*q))*(4*q-3)*GAMMA(L+2*q-3)*GAMMA(L+2*q-3-k)));
collect(f,[k,GAMMA])

then has 1 term which still contains a denominator, but I want them seperate so I can use ?op() for all additive terms.

Is there an option without expanding the entire thing to enforce termwise selection?

Of course I could do it in a second step, but I want to avoid it and think it should be simpler.


Thanks everyone for helping me over the years. I've just handed in my PhD- and I really considered Maple Primes like a supervisor.

Currently I am relearning Financial maths - as depending on grants I may leave academia :(

Today I am learning utility functions and risk aversion and thought to make a graphso i could visualise them

 Here is a graph of the log of the utility of x - with two utility functions - constant absolute risk aversion (lower surface) - and constant relative risk aversion (disjoint surface above); for both functions  g (and in the attached worksheet R) is a parameter of these functions; annoyingly for these versions of these functions to be plotted on the same axis - they are so different in scale that it is hard to see anything interesting.

However one of the key features of utility functions is that we consider them to be unaffected by scalling- i.e. that if U_2(x)=c*U_1(x) for all x then U_2(x) and U_1(x) are considered to be the same function.

This means that scalling can be done in a much more useful way than what I have done. Instead of plotting f(x;R)=x^(1-R)/(1-R) on the interval I (x=1..100), i'd like to plot g(x;R)=f(x;R)/max(f(x;R),I)  on the interval I.

I worked out that on a 2d graph this can be done using maximise. But I'd like to plot g(x;R) in 3d as both x and R vary and i cant think of how to do that! 

Cara_functions.mw

This is my program, I need to solve that differential equation but when i click on the pdsolve I don't get any result, do you know why?

thank you

I am implementing the Extended Euclides Algorithm in Maple for arbitrary domains.

This is my function so far:

EEA:=proc(ED,a,b)
    description
    "Extended Euclidean Algorithm"
    "INPUT: an Euclidean Domain ED and two elements from said domain"
    "OUTPUT: r,s,t such that r = gcd(a,b) = s*a + t*b ";
    local r_0, r_1, r_aux, s_0, s_1, s_aux, t_0, t_1, t_aux, q;
    # Domain checks
    # TODO: check that ED is an euclidean domain
    if not ED[Type](a) then error "1st argument must be of type ED" end if;
    if not ED[Type](b) then error "2nd argument must be of type ED" end if;
    
    # Initialization
    r_0 := a; r_1 := b; # gcd series
    s_0 := 1; s_1 := 0; # 1st cofactor series
    t_0 := 0; t_1 := 1; # 2nd cofactor series

    # Loop
    while r_1 <> 0 do;
        print("All is fine before the Quo");
        print(r_0); print(r_1);
        q := ED[Quo](r_0, r_1);
        print("All is fine after the Quo");
        
        r_aux := r_0 - q * r_1;
        r_0 := r_1; r_1 := r_aux;
        
        s_aux := s_0 - q * s_1;
        s_0 := s_1; s_1 := s_aux;

        t_aux := t_0 - q * t_1;
        t_0 := t_1; t_1 := t_aux;
    od;

    # Result
    return r_0, s_0, t_0;
    end proc:

Where ED is a Domain object passed as a parameter to the function.

When I call the function with certain arguments, it goes once through the loop and then in the second iteration crashes between the second and third print statement.

Concretely, upon making the call:

with(Domains): GI := Gaussian(Z); a := GI[Input](-87+47*I): b := GI[Input](-90+43*I): r, s, t := EEA(GI, a, b); evalb(a*s+b*t = r)

I get the following output:

              

        "All is fine before the Quo"
                              -87 + 47 _i
                              -90 + 43 _i
                      "All is fine after the Quo"
                      "All is fine before the Quo"
                              -90 + 43 _i
                                3 + 4 _i
    Error, (in E[Domains:-Rem]) cannot determine if this expression is true or false: 0 <= -90*`domains/Gaussian/badge0`(-87, 47)-43*`domains/Gaussian/badge0`(1, 0)*`domains/Gaussian/badge0`(-90, 43)

From this we should infer that calling `Gaussian(Z)[Quo]` on arguments `-90 + 43 _i` and `3 + 4 _i` should produce this error, right?

Well, think again, because when I try reproducing that from the notebook it decides to stop crashing. Calling:

    with(Domains): GI:=Gaussians(Z): a := GI[Input](-90+43*I); b := GI[Input](3+4*I); GI[Quo](a, b);

Produces the output:

                            a := -90 + 43 _i
                b := 3 + 4 _i
               -4 + 20 _i

What is going on? Why does it crash inside the function but not in the workbook?

I have a PDE.

I am trying to code for solving the pde by numerically and analytically.

But the code has an error.

Could you help me?

Best regards.
THE CODE: pde.mw

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]) || " "
 

First 752 753 754 755 756 757 758 Last Page 754 of 2426