MaplePrimes Questions

I prefer using the wotksheet envirionment

How do I make Maple input the default and 2D output the default?

SImilartly how do I change the default font size?

Using the VectorCalculus package in Maple 2020.2, the Jacobian does accept my target function, whereas the Hessian does not. Both the Jacobian and the Hessian need an algebraic expression for its input.

What can I do to make it work?

kind regards, Harry

 

vectorcalculus_question.mw

 

Sorry to bother you with a basic question again.

How do I get both the indexes and the values of a table?

Table.mw

 

The rational expression at the beginning of the code is approximant. p1-p5 are conditions imposed on t, and are to be solved simultaneously to obtain a[0]-a[4] which are then substituted into t to obtain Cf. S1-S4 are to be obtained from Cf and its derivative.

However, I observed that Cf is not providing the desired results. What have I done wrong? Please Can someone be of help?

Thank you and kind regards

 

restart:
t:=sum(a[j]*x^j,j=0..2)/sum(a[j]*x^j,j=3..4):
F:=diff(t,x,x):
p1:=simplify(eval(t,x=q))=y[n]:
p2:=simplify(eval(t,x=q+h))=y[n+1]:
p3:=simplify(eval(F,x=q))=f[n]:
p4:=simplify(eval(F,x=q+h))=f[n+1]:
p5:=simplify(eval(F,x=q+2*h))=f[n+2]:
vars:= seq(a[i],i=0..4):
Cc:=eval(<vars>, solve({p||(1..5)}, {vars}));
for i from 1 to 5 do
	a[i-1]:=Cc[i]:
end do:
Cf:=t;
M:=diff(Cf,x):
s4:=y[n+2]=collect(simplify(eval(Cf,x=q+2*h)),[y[n],y[n+1],f[n],f[n+1],f[n+2]], recursive);
s3:=h*delta[n]=collect(h*simplify(eval(M,x=q)),{y[n],y[n+1],f[n],f[n+1],f[n+2]},factor);
s2:=h*delta[n+1]=collect(h*simplify(eval(M,x=q+h)),{y[n],y[n+1],f[n],f[n+1],f[n+2]},factor):
s1:=h*delta[n+1]=collect(h*simplify(eval(M,x=q+2*h)),{y[n],y[n+1],f[n],f[n+1],f[n+2]},factor):

 

After I define a Ckt (a ladder network) such as :


Ckt := [v1(4), R1(50) &+ L2(0.9600), Cp(0.8200), L1(0.5000) &+ R2(0.2000), RL(1.3430) &+ LL(0.1550)]

How would I then use the value of R1 as defined above, for example, in a subsequent calculation?

Assuming the results from Solve are in (sol,rest), how can I use R1 (defined in Ckts)as a variable  --something like:

P_R1_ave := (abs(eval(v[R1], rest))/sqrt(2))^2/Ckt[R1]

t-match_impedance.mw

 

BTW, I can no longer "insert contents" .  I get the following error:

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/t-match_impedance.mw .
 

I have no idea what may have changed --perhaps something on our server?

The following code completes apparently without error on Maple 2020.2, but with Maple 2021.1 I get a deconnection from the kernel:

restart:
with(LinearAlgebra):
A:=Statistics:-Sample(Normal(0,1),[2500,2500]):
U,S,Vt:=SingularValues(A,output=['U','S','Vt']):
Norm(U.DiagonalMatrix(S).Vt-A);

The crash occurs when running the last line.

The code works on both versions with a smaller matrix (256x256).

Is there something obviously wrong with this piece of code, or a change in Maple 2021 that could explain this?

Note: I'm running Maple on Windows 10, the machine has 16 GB RAM, and the memory usage stays low.

I am trying to represent and compute integrals of closed 1-forms in 2 variables (the result of the integral does not depend on the path chosen), I would like them to display in the usual way

$$\int f(x,y) dx + g(x,y) dy$$

ideally both in the inert form (equivalent to the function Int) and active form (int, where Maple would if possible try to express the integral). The only computation requirement for the inert form would be that the x derivative gives $f$, and the y derivative gives $g$.

Is it possible to modify the possible arguments of the functions Int, int, such that they accept to represent such integral and implement a program to compute them if possible?

I know how to write a program to compute this, but the output display will not use the symbol $\int$ and will not behave nicely when differentiating.

I use a personal licensed copy of Maple (Maple 2020.2).  In the "help about" dialog there is a clickable box titled "Reactivate License".  Does this imply that my license is not activated?  I have not had any issues with using the software.

Regards

Frank

[Moderator: removed image of help-about dialog showing purchase code]

I am using Maple 2020.2 and it seems that the Linear Algebra package is incompatable with the Vector Calculus package:

Why not a friendly error message?
I want to use the Jacobian and the Hessian. Are there alternatives? MTM package can give a Jacobian, but no Hessian (but MTM is also tricky to use).

Harry

 

I am attaching the maple sheet in which you may see the function f I defined. I am using MacBook Pro and Maple 2020

test1.mw

Which one of these two versions, is the recommened one to use? For example, to check for type  integer*x, where x is literal x. i.e. identical(x)

restart;
TypeTools:-AddType('type_1', `&*`(integer,identical(x)));
type(3*x,type_1);

restart;
TypeTools:-AddType('type_1', '`*`'({integer,identical(x)}));
type(3*x,type_1)

Both work.  The difference is that `*` needs {} while `&*` does not.

I read the help page  and I do not understand what it says about the difference, and when is one supposed to use `*` vs. `&*`. it says 

              | `*`(type)  a product of factors of the given type
              | `&*`(type*)  a product of factors in which the nth factor is of the nth type specified in type*

Could possibly someone please explain in simple plain english what is the difference? If I use `&*`  vs. `*` with {}, will they work the same all the time or are there cases when to use one vs. the other?  Any rules of thumb to follow?

I need to simplify terms such as (cos(x)^2+sin(x)^2) to 1 if present in input, but I do not Maple to also do any other simplification rewriting polynomials that might be present in the expression.

And example will make it clear. Given this

expr:= (cos(x)^2+sin(x)^2)+5+(1+x+x^2+x^3)*(cos(x)^2+sin(x)^2)*exp(x);

I want expr to become  6+(1+x+x^2+x^3)*exp(x).   i.e. only simplify trig terms

But simplify(expr,trig); gives

                 6 + (x + 1)*(x^2 + 1)*exp(x)

Which is not what I want. Then I tried the trick of thaw and freeze to tell Maple to freeze polynomial type, like this

restart;
expr:= (cos(x)^2+sin(x)^2)+5+(1+x+x^2+x^3)*(cos(x)^2+sin(x)^2)*exp(x);
thaw(simplify(subsindets[flat](expr,satisfies(Z->type(Z,polynom(integer, x))),(freeze))));

And it actually worked, giving

           6 + (x^3 + x^2 + x + 1)*exp(x)

Question is: Why did simplify(expr,trig) not do what expected, which is to only simplify trig terms in expression and not mess around with the polynomial there? 

Is the above method of thaw/freeze to control which parts of expression gets simplify a recommended way to work around this, or is there a better way?

 

Please help to solve the equation 

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/Coefficients.mw .
 

Download Coefficients.mw

Hello everyone,

im new here and i've nerly no expertise in pd-equations. I was trying to solve this pd-system with the following-code:

 

with(plots);
with(DEtools);
with(PDEtools);


`&epsilon;g` := .4;
`&epsilon;s` := .6;
mg := 1;
mgs := 1;
`&rho;g` := 1.2;
`&rho;s` := 1100;
cpg := 1006;
cps := 880;
cpwa := 1920;
`&alpha;GS` := 20;
as := 800;
h_ads := 2700000;
pdgl1 := `&epsilon;g`*`&rho;g`*(diff(xG(t, z), t)) = -mgs-mg*(diff(xG(t, z), z));
pdgl2 := `&epsilon;s`*`&rho;s`*(diff(xS(t, z), t)) = mgs;
pdgl3 := `&epsilon;g`*`&rho;g`*(cpg+xG(t, z)*cpwa)*(diff(TG(t, z), t)) = -mg*(cpg+xG(t, z)*cpwa)*(diff(TG(t, z), z))+`&alpha;GS`*as*(TS(t, z)-TG(t, z));
pdgl4 := `&epsilon;s`*`&rho;s`*(diff(TS(t, z), t))*(cps+xS(t, z)*cpwa) = mgs*h_ads-`&alpha;GS`*as*(TS(t, z)-TG(t, z));
Init := {TG(0, z) = 401.15, TG(t, 0) = 401.15, TS(0, z) = 293.15, TS(t, 0) = 293.15, xG(0, z) = 0.5e-1, xG(t, 0) = 0.5e-1, xS(0, z) = .33, xS(t, 0) = .33};
sol := pdsolve({pdgl1, pdgl2, pdgl3, pdgl4}, Init, type = numeric, range = 0 .. 1, time = t);


Error, (in pdsolve/numeric/par_hyp) Incorrect number of boundary conditions, expected 2, got 4

 

 

When i change initial conditions to 4 it says he expected 2 and when i put 2 it says he expected 4.

Can anyone tell me where my misstake is or in what direction i have to look for an answer.

 

Thanks from before.

 

Can 

 

First 390 391 392 393 394 395 396 Last Page 392 of 2427