## RedefineTensorComponent in Physics package...

The Library:-RedefineTensorComponent in the physics package has got some serious problems, I guess in the update. It is not assigning the components at the right location for a tensor of rank 4 and above. It is working for tensors of rank 1, 2 and 3. Can someone please look into the issue and help out?

I am attaching the code with an example to indiacate the problem. Redefine.mw

## Is it possible to define variables with unusual na...

Hi,

Defining variables named H2 or O2 doesn't pose any problem (H__2 for instance), but could it be possible in Maple 2019 to define a variable named H2O2 ?

## How should I present my system of first order ODE'...

Hello,

I have a question regarding the dsolve function in Maple. I am trying to solve a system of 5 first order ODE's. First I solve the differential equations to arrive at the general solution using the dsolve command. Here Maple already produces very large and slow output while I would actually expect a much more compact output.

Then I want to evaluate the final solution by using the initial conditons. At this point Maple keeps 'evaluating..' and does not come up with a solution. Only when I fill in all the parameters Maple finds a solution ( still very slow ). However as I want to be able to play with the input parameters after evaluation I want a solution without having to fill in the parameters prior to solving the system.

My question is whether I am presenting the system of ODE's in the right way to Maple. Should I rewrite the system for Maple to be able to produce a more dense solution? Or should I for instance use Laplace Transform to simplify the equations prior to solving?

Joa

restart;

eq1 := sig_total-sig2(t)-sig3(t)-sig4(t)-sig5(t)+T1*(-(diff(sig2(t), t))-(diff(sig3(t), t))-(diff(sig4(t), t))-(diff(sig5(t), t))) = u1*(diff(eps(t), t));
eq2 := sig2(t)+T2*(diff(sig2(t), t)) = u2*(diff(eps(t), t));
eq3 := sig3(t)+T3*(diff(sig3(t), t)) = u3*(diff(eps(t), t));
eq4 := sig4(t)+T4*(diff(sig4(t), t)) = u4*(diff(eps(t), t));
eq5 := sig5(t)+T5*(diff(sig5(t), t)) = u5*(diff(eps(t), t));

dsolve({eq1, eq2, eq3, eq4, eq5}, {eps(t), sig2(t), sig3(t), sig4(t), sig5(t)});
sig_total := sig_0;
desys := {eq1, eq2, eq3, eq4, eq5}; ic := {eps(0) = sig_0/(E1+E2+E3+E4+E5), sig2(0) = sig_0/(1+(E1+E3+E4+E5)/E2), sig3(0) = sig_0/(1+(E1+E2+E4+E5)/E3), sig4(0) = sig_0/(1+(E1+E3+E2+E5)/E4), sig5(0) = sig_0/(1+(E1+E3+E4+E2)/E5)};

solution := combine(dsolve(desys union ic, {eps(t), sig2(t), sig3(t), sig4(t), sig5(t)})); assign(solution);

E_total := 33112; a := .1; b := .2; c := .15; d := .2; e := .35;

E1 := a*E_total; E2 := b*E_total; E3 := c*E_total; E4 := d*E_total; E5 := e*E_total; T1 := 1; T2 := 10; T3 := 100; T4 := 1000; T5 := 10000; u1 := T1*E1; u2 := T2*E2; u3 := T3*E3; u4 := T4*E4; u5 := T5*E5; sig_0 := 2;

plot(eps(t), t = 0 .. 672, y = 0 .. 0.12e-3);
y := eval(eps(t), t = 672);
evalf(y);

## how do we solve an algebraic equation?...

How do I extract the real solutions of a polynomial that has solutions both in real and complex domains?

## Invalid arguments to function multiply...

Why do I get an error here?

G := GF(2, 3, T^3+T^2+1);

G:-`*`(T, T);
Error, (in *) modp1: invalid arguments to function Multiply

p.s. how do I specify what variable is used for my finite field without needing to specify an irreducible polynomial?

## How do I work with polynomials over finite fields?...

How do I work with polynomials over finite fields?  not just the integers mod p but over  https://www.maplesoft.com/support/help/Maple/view.aspx?path=GF

## writing and calling functions in maple???...

So what is the Maple equivalent of  functions/scripts?   and how do I call them?   like I have define the function f in the worksheet (in a code edit region) , but f(2)  just returns f(2)  no function evaluation.

p.s. can someone recommend a guide on programming in maple?  Like writing and calling functions not   their standard programming guide which is long winded and not helpful.

## Covariant derivative of a specific vector...

Hi there!

Sorry to ask, but I don't know how I can solve it in a smart way. I want to take the covariant derivative of a specific vector, whose components are specifically defined, which can be constant or some functions of the coordinates. But, as soon as I define that specific vector, the covariant derivative fails to compute, saying there are "too many levels of recursion". Let me show what I mean.

I have these two attempts to get this:

First attempt

 (1.1)

 (1.2)

 (1.3)

 (1.4)

 (1.5)

 (1.6)

 (1.7)

 (1.8)

 (1.9)

Second attempt

 (2.1)

 (2.2)

 (2.3)

 (2.4)

 (2.5)

 (2.6)

On my first attempt, expression (1.7) is almost fine, but β is supposed to be constant (and a function of "t" in the future), so I set it as a constant function. But then it causes that problem. Therefore, on my second attempt, I tried to set β as a parameter since the beginning, but it was no good either.

If I were to take the covariant derivative as "D_[nu](b[mu])" (without the "(X)"), it would not have that specific problem, but would not be a good solution, since the covariant derivative would discard the partial derivative of b[mu] and, if it would have some dependence on the coordinates, it would give a wrong result.

The only way it seems to work is by defining the tensor "Db[mu,nu]" explicitly as "d_[mu](b[nu](X)) - Christoffel[~alpha, mu, nu]*b[alpha]". (It seems that the problem comes from that "(X)" next to "b[alpha]" in the connection term.) But that would be an awful way to circumvent the problem. Isn't there any better way to get this?

Can someone help me with this, please?

Thanks for any help!

## How to open text file and run without choose maple...

I rename text file as mws when I click it , it show a few button and then need to extra click maple input and then need to click enter in order to run.

how to run directly when I open it with maple?

## How can Hooke's law be modified for a spring const...

For a spring hanging vertically from a fixed point, suppose the spring constant, k, is a function of the distance from the fixed point to the other (lowest) end of the spring (for example; the diameter of the spring's coils changes along the length of the spring) .

What ODE reflecting this situation will yield solutions for the harmonic motion of the spring after it is stretched from its equilibrium position?

## Apparent bug in "applyrule" for wildcard argument ...

In Maple 2019, I'm using the "applyrule" function to write a simple routine for contracting vector indices, following the Einstein summation convention (repeated indices are summed).

Input:

applyrule(
vec(a::symbol, i::symbol) * vec(b::symbol, i::symbol) = dotproduct(a,b),
vec(a,k) * vec(b,k)
);

Output:

dotproduct(a, b)

So far it works as expected. Now I add an "uncontracted" vector, and the code seems to become unpredictable. First, let me show a case in which the code still works:

Input:

applyrule(
vec(a::symbol, i::symbol) * vec(b::symbol, i::symbol) = dotproduct(a,b),
vec(u,k) * vec(u,i) * vec(c,k)
);

Output:

dotproduct(c, u)*vec(u, i)

As expected, contraction has been done on the repeated index "k", but vec(u,i) was left alone. However, the above code fails if I simply change the variable name "u" to "a":

Input:

applyrule(
vec(a::symbol, i::symbol) * vec(b::symbol, i::symbol) = dotproduct(a,b),
vec(a,k) * vec(a,i) * vec(c,k)
);

Output:

vec(a, k)*vec(a, i)*vec(c, k)

Apparently, the rule was not applied because I used "a:symbol" in the transformation rule. But I thought "a::symbol" should be considered a wildcard that represents any symbol, including "a" itself?

Depending on the exact input, this bug sometimes shows up, sometimes not, but the above examples are verified to be reproducible. A simple workaround is always avoiding the use of the same variable, but this seems to be hack. Is there a proper solution?

## How do I Drag+Drop PNG to Maple Worksheet without ...

How can add a PNG within a text section of a Maple Worksheet without having the image appear with a black background?

Does Maple have an alpha channel or transparency setting that must be toggled for this to work?

Maple 2019
macOS 10.14.6

I am added pictures from the clipboard via drag+drop.

(Yes, I know that I can use JPEG without this problem and that is NOT my question).

--
JJW

## how can i get maximize in dsolve numeric...

hi . i want to get maximize in dsolve numeric y(t) D(y)(t) and y(t) double dot

restart;
with(plots);
with(Optimization);
sol := {diff(y(t), t, t) + 2*diff(y(t), t) + 4*y(t) = 0.9*sin(9*t), y(0) = 0, D(y)(0) = 0};
so := dsolve(sol, numeric, method = rkf45);
plots:-odeplot(so, [t, y(t)], t = 0 .. 4);
Maximize(??????);

## i want to use 6 cores cpu for solve...

hello. i write this code for use 6 cpu cores but it write 4

## How to eval Diff(x,x)?...

I find eval(Diff(x,x)) still is Diff(x,x)

how to make become 1

or how to evaluate Capital Diff ?

and I find sum(diff(x^k,x)/k! , k=1..n)

return exp(x) *gamma(n,x)/gamma(n)

why not exp(x)?

and diff( m(x+ diff(...) ...) / diff without m(x) , why return 0

i still have not define m(x)

 First 325 326 327 328 329 330 331 Last Page 327 of 2141
﻿