simp.mw

## How do I solve a system of differential equations ...

Hello everyone

I need help solving a system of equations as below. I'm looking for a way to do it, but I don't understand the general concept of how such an equation is calculated. So far I've been using a package in LabVIEW that worked similarly to Simulink and that was clear to me, whereas here I'm overwhelmed by the multitude of options and that's why I'm asking for help.

I need to solve these equations analogously to Matlab-Simulink, i.e., a time interval and integration step, and a numerical procedure in symbolic versions.

Help_me.mw

## How to substitute into contravariant index...

How do you substitute into a contravariant index of a tensor say

T[~mu, nu]     ?

Nothing seems to work, I tried to subs(~mu=~1,T[~mu, nu]), subs(mu=1,T[~mu, nu]), and all permutations.

Substituting values into the covariant index works fine but not contravariant.

Surely it must be possible ?

## How to do SumOverRepeatedIndices...

restart:with(Physics):

Setup(dimension=3,coordinates=(X=[x,y,z])):

Define(Tp3[~alpha,~beta,~gamma],B[~lambda,mu],T3[~rho,~epsilon,~sigma]):

Tp3[~alpha,~beta,~gamma]=B[~alpa,rho]B[~beta,epsilon]B[~gamma,sigma]T3[~rho,~epsilon,~sigma]

SumOverRepeatedIndices of the expression does not do anything. Why?

## Simplify using trig identities...

What should I do to simplify eq13 further using trig sum identities?

 > restart;
 > phi := (x,n,L) -> sqrt(2/L)*sin(n*Pi*x/L + 1/2*n*Pi);
 (1)
 >
 > eq1 := W[n,m](q,p) = simplify(1/Pi*Int(phi(q+y,n,L)*exp(-2*I*p*y)*phi(q-y,m,L),y=-L/2+abs(q)..L/2-abs(q)));
 (2)
 > eq2 := simplify(convert(eq1,int)) assuming(n,integer,m,integer);
 (3)

Wigner function evaluated for q > 0 and q < 0, respectively

 > eq10 := simplify(eq2) assuming(q>0); eq11 := simplify(eq2) assuming(q<0); eq12 := simplify(eq10) assuming(m,integer,n,integer); eq13 := simplify(eq11) assuming(m,integer,n,integer);
 (4)

## how to determine lambda, m0, and n0?...

how to determine lambda, m0, and n0? a_i, and c_i are constants and c^2 = c[1]^2 + c[2]^2. solA.mw

## How do I solve equation?...

How do I solve equation (1) for omega, rho, lambda1, and lambda2? verif.mw

## Ode exact solutions...

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >

How to find the exact solution of ODE's

## can we express 'X' in terms of 'L'?...

can we express 'X' in terms of 'L'? i.e., X = (some const)*L XintoL.mw

## Why does 'simplify' not work when calculating Eige...

Why does 'simplify' not work when calculating Eigenvectors? Further, how can we express (2) in a more simplified form by using 'simplify'?simplify.mw

## Maple returning apparently undefined expression...

I am trying to solve the following recursion for any n, given a constant c. Here is my code for it:

```c := 2:

A[i] := rsolve({a(0) = 1/n, a(i) = ((n - i + 1)/(n - i) + 1/(c*(n - i)))*a(i - 1)}, a);

total := evala(Simplify(sum(eval(A[i], i=k), k=0..n-1)));
evalf(eval(total, n = 6));```

For c = 1, I get a valid (and correct) output, however for c = 2 for example, rsolve is returning , which does not make sense when n is an integer. Is there something I am doing wrong here? Not sure why this is happening. Thanks!

## differential quadrature method stuck at rk4 method...

im trying to write differential quadrature method i have successfully  generated system of equations using code but now im stuck with rk4 method to solve these equation in a loop kindly give me suggestions or modify the code

 >
 >
 >
 (1)
 >
 >
 (2)
 >
 (3)
 >
 >
 (4)
 >
 >
 u_1 = -u[1]*(-10.1340811913091*u[1]+15.4039041703445*u[2]-8.08708750877537*u[3]+3.92079823166652*u[4]-1.10353370192667*u[5])+.046910077030668 u_2 = -u[2]*(-1.92051204726391*u[1]-1.51670643433575*u[2]+4.80550130432862*u[3]-1.85711605328765*u[4]+.488833230558754*u[5])+.230765344947158 u_3 = -u[3]*(.602336319455661*u[1]-2.87077648466948*u[2]-1.11022302462516e-015*u[3]+2.87077648466942*u[4]-.602336319455684*u[5])+.5 u_4 = -u[4]*(-.488833230558737*u[1]+1.85711605328767*u[2]-4.8055013043286*u[3]+1.51670643433578*u[4]+1.92051204726404*u[5])+.769234655052844 u_5 = -u[5]*(1.1035337019266*u[1]-3.92079823166643*u[2]+8.08708750877511*u[3]-15.4039041703442*u[4]+10.1340811913086*u[5])+.95308992296933
 >
 >
 Initial condition for u_1: u_1(0) = 0.010000 Initial condition for u_2: u_2(0) = 0.020000 Initial condition for u_3: u_3(0) = 0.030000 Initial condition for u_4: u_4(0) = 0.040000 Initial condition for u_5: u_5(0) = 0.050000
 >
 >
 >

## Multiplaction "dot" is way too small - causes erro...

Multiplaction "dot" in Maple 2022 is way too small - causes errors.

e.g. two variables multiplied s*m ends up being sm a new variable as I cannot really see that there is a missing multiplication operator between the variables. This causes huge unnecessary errors.

Maple 9.x e.g had nice clear and big operators and this kind of error was avoided.

How can I undo this unfortunate regression in Maple 2022 to increase the size of multiplication operator and other operators, so that they actually becom visible and not just a little dot almost a pixel in size.

If I was a falcon (20x20)^infinity then this would have been ok, but I am not, I am human.

So how do I change this unfortunate regression so that these errors can be avoided.?

## Only ten files listed in the recents list...

Why does Maple 2022 still have only a history of ten files in the Recents ?

It makes it very difficult to search for files you opened but only realised later you need, but then it is long out of the silly 10 history list.

Isnt there a way to make a perpetual list so that all files opened are saved chronologiacally against date, or... at least be able to increase the silly 10 recent files to something like 30

Thanks

## Procedure called in another procedure...

In my code, why  does InitState(5,5) return only one element of the vector while Coherent(5) returns 5 elements of the vector?

 > restart;
 > with(LinearAlgebra):
 >
 > Coherent := proc({zeta:=1,phi:=Pi/2},n_max) local alpha,i,ICs:  #alpha := sqrt(zeta)*exp(I*phi):  ICs := Vector(n_max,i->evalc(evalf(exp(-zeta/2)/sqrt((i-1)!))*(sqrt(zeta)*exp(I*phi))^(i-1)),datatype=complex[8]); end proc: Projectile := proc({L:=1,sigma:=0.01,beta:=0.02,k0:=-5*Pi},n_max) local x0,g,c,v,ICs,j:   x0 := evalf(beta*L);   g := unapply(exp(-(x-x0)^2/2/sigma^2),x);   c := evalf(int(g(x)^2,x=-L/2..L/2,numeric=true));     v:=Vector(n_max,datatype=complex[8]);   for j from 1 to n_max do:      if (is(j,odd)) then  v[j]:= evalc[8](evalf(Int(cos(Pi*j*x/L)*g(x)*cos(k0*x),x=-L/2..L/2,method=_d01akc))+ I*evalf(Int(cos(Pi*j*x/L)*g(x)*sin(k0*x),x=-L/2..L/2,method=_d01akc)));       else v[j]:= evalc[8](evalf(Int(sin(Pi*j*x/L)*g(x)*cos(k0*x),x=-L/2..L/2,method=_d01akc))+ I*evalf(Int(sin(Pi*j*x/L)*g(x)*sin(k0*x),x=-L/2..L/2,method=_d01akc)));      end if:   end do:  ICs :=evalf[8](sqrt(2/L*c))*v; end proc: InitState := proc({zeta:=1,phi:=Pi/2,L:=1,sigma:=0.01,beta:=0.02,k0:=-5*Pi},d1,d2) local Z0: z1 := Coherent(zeta,phi,d1); #Z0:= MatrixMatrixMultiply(Coherent(zeta,phi,d1),Transpose(Projectile(L,sigma,beta,k0,d2))): end proc:
 > InitState(5,5); Coherent(5);
 (1)