MaplePrimes Questions

Are there rules of thumb to follow to decide to use evalindets vs. subsindets?  They seems to do the same thing, but I did not read every details of the help pages.  Is the difference similar to difference between using eval vs. subs? i.e.

          eval(expr,A=2)

vs.

         subs(A=2,expr) ?

For example

expr:=ln(A)+ln(B);
evalindets(expr,`&+`('specfunc(ln)','specfunc(ln)'),f->ln(op([1,1],f)*op([2,1],f)));
subsindets( expr, `&+`('specfunc(ln)','specfunc(ln)'), f->ln(op([1,1],f)*op([2,1],f)));

Both give

I am learning very basic matrix ops in Maple and I'm running into questions nearly at every step.

At the risk asking too many trivial questions, I have written my ~7 questions in the attached worksheet in red font.

Any answers will be appreciated.

matrix_ops_Qs.mw

matrix_ops_Qs.pdf

Hello

After using maple for quite a while, I am still confused by some basic concepts.   

Given the following table, how can I select the indices for which the entry is not null ([])?  

table([1 = NULL, 2 = NULL, 3 = NULL, 4 = NULL, 5 = NULL, 6 = NULL, 7 = 5, 9 = NULL, 8 = NULL, 11 = 4, 10 = NULL, 13 = NULL, 12 = NULL, 15 = 9, 14 = NULL, 18 = NULL, 19 = 8, 16 = 9, 17 = NULL, 22 = 9, 23 = NULL, 20 = NULL, 21 = 8, 27 = NULL, 26 = 8, 25 = 4, 24 = NULL, 31 = NULL, 30 = 9, 29 = NULL, 28 = 9, 36 = NULL, 37 = 9, 38 = 9, 39 = NULL, 32 = 5, 33 = NULL, 34 = NULL, 35 = NULL, 45 = NULL, 44 = NULL, 47 = NULL, 46 = NULL, 41 = 8, 40 = NULL, 43 = NULL, 42 = NULL, 54 = NULL, 55 = NULL, 52 = NULL, 53 = NULL, 50 = NULL, 51 = NULL, 48 = 5, 49 = 9, 60 = 8, 59 = NULL, 58 = 7, 57 = 7, 56 = NULL])

Many thanks

Hello Everyone, 

My questions is about a straight forward as my title suggests. I know how to compute the variation by hand and of course it is in plently of books, but I would like to know how I could possibly do it in Maple as I have some terms with non-trivial contributions where I infact need that specific variation. 

I have attached my file I have been working with that has more comments.

RicciAction.mw

Thank you

Hi, 

Maple has corrupted my file without notice. I get the error "There was a problem in the loading process, you worksheet may be incomplete."

I've tried restarting maple, checked my backup folder, and followed maples troubleshooting process (maplesoft support) without any luck.

Anyone who might help me here? 

File: Assignment2.mw

The algebraic equation in four variables is: 

restart;
expr := (a^2 + b^2 + c^2 + d^2 - 4)*(a^2 + b^2 + c^2 + d^2) + 4*d*c*b*a - (a + b + c + d - 2)*(a + b + c + d) + 6:
solve(expr = 0, useassumptions, allsolutions) assuming nonnegative;

Unfortunately, I've been waiting for a long time, and I have no more time to wait; I have to interrupt the current session by hand. However, it appears that MMA can solve it within bearable time:

Did Maple miss something here?

in my program, I keep assumptions in a set. Sometimes this is empty if no assumptions are used. This never caused a problem before (at least I do not think so, else I would have seen it) when using empty {} in assuming, except for now.

Here is one example below. Is this a known problem? I noticed when changing {} to [] the error goes away. I am not sure why, and if this is known issue. But will change from a set to a list to avoid this. 

Maple 2022.2 on windows 10

interface(version);

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1392 and is the same as the version installed in this computer, created 2023, February 13, 12:58 hours Pacific Time.`

restart;

ode:=diff(diff(y(x),x),x)+diff(y(x),x)^2+diff(y(x),x) = 0;
ic:=y(0) = 0;
sol:=y(x) = -ln(exp(x))+ln(-1+_C1*exp(x))-ln(-1+_C1);

diff(diff(y(x), x), x)+(diff(y(x), x))^2+diff(y(x), x) = 0

y(0) = 0

y(x) = -ln(exp(x))+ln(-1+_C1*exp(x))-ln(-1+_C1)

odetest(sol,[ode,ic]) assuming {};

Error, (in convert/multiset) too many levels of recursion

odetest(sol,[ode,ic]) assuming [];

[0, 0]

odetest(sol,[ode, ic]);

[0, 0]

 

Download feb_14_2023.mw

I am trying to find remainder of (2 + sqrt(3))^15 + (2 - sqrt(3))^15 with 2017. I tried
irem((2 + sqrt(3))^15 + (2 - sqrt(3))^15, 2017);

I do not get the result. How can I get the result?

I use like this 
a := expand((2 + sqrt(3))^15 + (2 - sqrt(3))^15);
irem(a, 2017);

get the result.

I am tyring to simulate the intensity autocorrelation of a femtosecond laser pulse.   The pulse intensity is set up as a 4096 point Vector of real values using a sech function for the pulse shape (see below). 

Being that it's the intensity, not the complex field, of the laser pulse, it is always real-valued and positive.    Therefore, the autocorrelation of the pulse intensity should be positive at all points in time.   But in fact, when I use the AutoCorrelation command on this Vector, it results many negative-valued points (see below).

What is going on?   Why am I getting negative values?

Thanks!

-Gregg-

I am new to Maple. I'm having trouble with simple caluclations such as the one in the image. The answer (after simplificatoin and cancellations) should be (|a|^2+|b|^2)(x^2 + y^2 + z^2)  but it's not happening! The result shown is correct; only the simplification is missing. What step am I missing?

The calculation is so simple, a look at the picture should suffice for the expert,

(sorry! I still don't know how to pick-off a single tab out from the whole workbook).

Question-2: judging from the missing overbar (complex conj) on z, the "assuming" seems to only apply to z and not x and y.

if that is correct, then why?

Question-3: How can I implement the constraint (|a|^2+|b|^2)=1 (preferably)before or after this  multiplication? I tried assume((|a|^2+|b|^2)=1), and though it compiled it did not help with the simplification.

TYVM

i have on ode with some parameters. it is ok and it is solved. but when i substitute the parameter itself, it is not solved, can i use any assumption to solve this? tnx for the help.

restart

ode := diff(T(x), x, x)+q/k = 0

diff(diff(T(x), x), x)+q/k = 0

(1)

dsolve(ode)

T(x) = -(1/2)*q*x^2/k+_C1*x+_C2

(2)

ics1 := -k*(D(T))(0) = h[1]*(T[inf1]-T(0)), -k*(D(T))(0.5e-1) = h[2]*(T(0.5e-1)-T[inf2])

-k*(D(T))(0) = h[1]*(T[inf1]-T(0)), -k*(D(T))(0.5e-1) = h[2]*(T(0.5e-1)-T[inf2])

(3)

dsolve({ics1, ode})

T(x) = -(1/2)*q*x^2/k-(1/40)*h[1]*(800*k*T[inf1]*h[2]-800*k*T[inf2]*h[2]-40*k*q-q*h[2])*x/((20*k*h[1]+20*k*h[2]+h[1]*h[2])*k)+(1/40)*(800*k*T[inf1]*h[1]+800*k*T[inf2]*h[2]+40*T[inf1]*h[1]*h[2]+40*k*q+q*h[2])/(20*k*h[1]+20*k*h[2]+h[1]*h[2])

(4)

ics2 := -k*(D(T))(0) = h[1]*(T[inf1]-T(0)), -k*(D(T))(L) = h[2]*(T(L)-T[inf2])

-k*(D(T))(0) = h[1]*(T[inf1]-T(0)), -k*(D(T))(L) = h[2]*(T(L)-T[inf2])

(5)

dsolve({ics2, ode})

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: {T(L), T(x)}

 

``

Download ExactSol.mw

 Hi,

The problem of saving photos in eps format with a small size
When I draw a function diagram with Maple, when I save the photo in eps format, the size is high, but I want the size to be high and the volume to be low, what should I do? If anyone can and knows how to draw with MATLAB, write the code for me, I would be grateful

Update: partly resolved in Maple 2023. int_warning.mw still does not show the warning

There is a very helpful warning about using assumptions from the int command that does not appear in the attached case:
Warning, unable to determine if -1 is between 0 and x0; try to use assumptions or use the AllSolutions option
Warning, unable to determine if 1 is between 0 and x0; try to use assumptions or use the AllSolutions option

Using infolevel[int]:=5 in Maple 2022.2,  one can see that the integrals listed under int/ellalg/elltype are not the same.

My preference would be to have this warning always working. It's a reminder that Maple cannot give a general answer but that there might be solutions for a restricted real domain. The warning also does not reproduce when execution the corresponding help page
(Update: the warning reproduces in Maple 2023)

https://www.maplesoft.com/support/help/errors/view.aspx?path=Warning,%20unable%20to%20determine%20if%201%20is%20between%200%20and%20x__0;%20try%20to%20use%20assumptions%20or%20use%20the%20AllSolutions%20option

Sidenote: This kind of warning is so useful that I wonder if and how such warnings could be extended beyond  integration with piecewise solutions. (Maybe also to other commands. Maple often returns input unevaluated because there is no general solution in the complex domain, without informing the inexperienced user that there might be solutions available in the real domain.)

int_warning.mw

int_warning_with_infolevel.mw

My question is can the last step be equal to 1/6.

I want to output to 1/6. it outputs to sqrt(9)/18 - (See Below).

NULL"5)Square root: undefined - DNE (Limit does not exist):"

NULL

NULL

NULL

limit((sqrt(x+1)-3)/(x-8), x = 8)"(=)"1/6 

 

 

limit((sqrt(x+1)-3)/(x-8), x = 8)Limit(((x+1)^(1/2)-3)/(x-8), x = 8) = (1/18)*9^(1/2)"(=)"Limit(((x+1)^(1/2)-3)/(x-8), x = 8) = 1/6

NULL

Download limit-sqrt-5.mw

First 228 229 230 231 232 233 234 Last Page 230 of 2425