## Similar algebraic equations...

Dear Users!
Hope you all are fine with everything. How we can identify the same equations from a number of equations using maple command, like
Eq1:=5.09295817894067*&tau;u[1, 1]-30.5577490736439*&tau;u[2, 1]+178.253536262923*&tau;u[3, 1]-30.5577490736439*&tau;u[1, 2]+183.346494441862*&tau;u[2, 2]-1069.52121757753*&tau;u[3, 2]+178.253536262923*&tau;u[1, 3]-1069.52121757753*&tau;u[2, 3]+6238.87376920228*&tau;u[3, 3];
Eq2:=5.09295817894067*&tau;u[1, 1]+10.1859163578814*&tau;u[2, 1]+15.2788745368241*&tau;u[3, 1]-30.5577490736439*&tau;u[1, 2]-61.1154981472883*&tau;u[2, 2]-91.6732472209439*&tau;u[3, 2]+178.253536262923*&tau;u[1, 3]+356.507072525849*&tau;u[2, 3]+534.760608788841*&tau;u[3, 3]-3/7;
Eq3:=5.09295817894067*&tau;u[1, 1]-30.5577490736439*&tau;u[2, 1]+178.253536262923*&tau;u[3, 1]+10.1859163578814*&tau;u[1, 2]-61.1154981472883*&tau;u[2, 2]+356.507072525849*&tau;u[3, 2]+15.2788745368241*&tau;u[1, 3]-91.6732472209439*&tau;u[2, 3]+534.760608788841*&tau;u[3, 3]-9/7;
Eq4:=5.09295817894067*&tau;u[1, 1]+10.1859163578814*&tau;u[2, 1]+15.2788745368241*&tau;u[3, 1]+10.1859163578814*&tau;u[1, 2]+20.3718327157631*&tau;u[2, 2]+30.5577490736484*&tau;u[3, 2]+15.2788745368241*&tau;u[1, 3]+30.5577490736484*&tau;u[2, 3]+45.8366236104784*&tau;u[3, 3]-12/7;
Eq5:=5.09295817894067*&tau;u[1, 1]-30.5577490736439*&tau;u[2, 1]+178.253536262923*&tau;u[3, 1]+50.9295817894067*&tau;u[1, 2]-305.577490736439*&tau;u[2, 2]+1782.53536262923*&tau;u[3, 2]+504.202859715131*&tau;u[1, 3]-3025.21715829077*&tau;u[2, 3]+17647.1000900295*&tau;u[3, 3]-18/7;
Eq6:=5.09295817894067*&tau;u[1, 1]+10.1859163578814*&tau;u[2, 1]+15.2788745368241*&tau;u[3, 1]+50.9295817894067*&tau;u[1, 2]+101.859163578814*&tau;u[2, 2]+152.788745368241*&tau;u[3, 2]+504.202859715131*&tau;u[1, 3]+1008.40571943027*&tau;u[2, 3]+1512.60857914560*&tau;u[3, 3]-3;
Eq7:=5.09295817894067*&tau;u[1, 1]+10.1859163578814*&tau;u[2, 1]+15.2788745368241*&tau;u[3, 1]-30.5577490736439*&tau;u[1, 2]-61.1154981472883*&tau;u[2, 2]-91.6732472209439*&tau;u[3, 2]+178.253536262923*&tau;u[1, 3]+356.507072525849*&tau;u[2, 3]+534.760608788841*&tau;u[3, 3]-3/7;
Eq8:=5.09295817894067*&tau;u[1, 1]+10.1859163578814*&tau;u[2, 1]+15.2788745368241*&tau;u[3, 1]+10.1859163578814*&tau;u[1, 2]+20.3718327157631*&tau;u[2, 2]+30.5577490736484*&tau;u[3, 2]+15.2788745368241*&tau;u[1, 3]+30.5577490736484*&tau;u[2, 3]+45.8366236104784*&tau;u[3, 3]-12/7;
Eq9:=41.7622570673196*&tau;u[3, 1]+41.7622570673196*&tau;u[1, 3]+15.2788745368220*&tau;u[1, 1]+83.5245141346398*&tau;u[2, 3]+30.5577490736443*&tau;u[2, 1]+113.063671572516*&tau;u[3, 3]+83.5245141346398*&tau;u[3, 2]+30.5577490736443*&tau;u[1, 2]+61.1154981472892*&tau;u[2, 2];
In above equations Eq2 and Eq7; Eq4 and Eq8 are same. If I have set of 100 equation how I can identify similar equations?
@acer @Kitonum @Preben Alsholm

## Required; a physics explanation...

The uploaded worksheet describes a mechanics scenario which I would like to animate.

While I understand the expression for the kinetic energy of the torus, the term containing cos(theta) within the expression for the KE of the pearl baffles me.

From which physics aspect of the scenario does this term derive?

Pearl_in_torus.mw

## Why does the tilde operator sometimes fail?...

Hi,

While trying to convert into integers a sample S drawn from a binomial distribution,  I've observed that  round~(S) didn't do the job while map(round, S) did it.

First question: why the first syntax and the second one are not equivalent on this case?

I investigated a little bit further by applying round~ on a row vector T of Hfloats (thus T and S are "identical")

Second question: While  round~(S) doesn't work but round~(T) does?

 > restart
 > S := Statistics:-Sample(Binomial(10, 0.5), 2); round~(S);      # Why round~(S) doesn't return integers map(round, S);  # but map(round, S) does? lprint(S)
 Vector[row](2, {1 = HFloat(6.), 2 = HFloat(7.)}, datatype = float[8], storage = rectangular, order = Fortran_order, shape = [])
 > # Evaluation of round~(T) on a vector of Hfloats T := Vector[row](2, [HFloat(6.), HFloat(3.)]); lprint(S); round~(T);   # round~(T) returns integers,
 Vector[row](2, {1 = HFloat(6.), 2 = HFloat(7.)}, datatype = float[8], storage = rectangular, order = Fortran_order, shape = [])
 (1)
 >

## How can i make assumptions for all subscript-varia...

Hello,

In this simple example in Maple 2019:

k[1] := 16;

solve(k[2]^2 = k[1], {k[2]}, useassumptions) assuming 0 < k;

The result of the solve is

{k[2] = 4}, {k[2] = -4}

which is not what I'm expecting.

I'm expecting

{k[2] = 4}

I'm trying to assume that both the variable named k[1] and the variable named k[2] are greater than 0 by assuming that 0 < k.
My goal is a way to make the same assumption for variables with the same base but different subscripts.
How can I do this?

## Combining and converting units...

 >

Note: To enter units, I used the unit key (blue) in the Units palette.

When I use the combine and simplify functions to manipulate temperature units, Maple returns a wrong answer, as we can see below;

 >
 (1)
 >
 (2)

The quantity 20 Celsius is not converted correctly. However, for other types of dimensions, the combine and simplify functions work correctly.

 >
 (3)
 >
 (4)
 >

Another strange thing happens with the convert function, with temperature units. When we use the same source unit, the convert function deletes the unit, leaving only the quantity.

 >
 (5)

I do not understand why this occurs.

 >
 (6)

I do not understand why this occurs.

Oliveira

## lprint output (format)...

If I copy the output of a lprint command e.g.
lprint(<1,2;3,4>);

Matrix(2,2,{(1, 1) = 1, (1, 2) = 2, (2, 1) = 3, (2, 2) = 4},datatype = anything
,storage = rectangular,order = Fortran_order,shape = [])

and paste it in a new execution group, I obtain a "Line print output" instead of a Maple (1D) input,
so it cannot be executed.
(Of course, it's possible to paste in Notepad to remove the format, but it's annoying.)

This happens in Maple 2019,  Windows 64, Worksheet mode, 1D input;  but not all the time (sometimes it is as it used to be).
Do you see the same behavior?

## Statistics fails to reject invalid parameter value...

Maple doesn't completely check the condition on the number of trials "n" for Binomial and NegativeBinomial distributions (package Statistics).
The attribute "Conditions" explicitely says that n must be a strictly positive integer but no strictly positive real valuereturna an error (ok, it would be stupid to set n to a non integer value !!!).

I think it is a default that ought to be corrected in future releases (this default still exists in Maple 2018)

 > restart
 > kernelopts(version)
 (1)
 > with(Statistics):

BINOMIAL DISTRIBUTION

 > X := RandomVariable(Binomial(n, p)): L := [attributes(X)][3]: A := exports(L)
 (2)
 > L:-Conditions
 (3)
 > # Maple should return an error for N is not of type posint # # It seems that Sample uses floor(N) N := 10.49; type(N::posint); P := 1/2: X := RandomVariable(Binomial(N, P)): Mean(X), N*P; ProbabilityFunction(X, k); S := Sample(X, 10^6): Mean(S); # A non consistent result (only non negative values of k should be accepted) eval(ProbabilityFunction(X, k), k=evalf(Pi));
 (4)

NEGATIVE BINOMIAL DISTRIBUTION

 > X := RandomVariable(NegativeBinomial(n, p)): L := [attributes(X)][3]: A := exports(L): L:-Conditions
 (5)
 > N := 10.49: P := 1/2: X := RandomVariable(NegativeBinomial(N, P)): Mean(X)

## When i type sqrt(25), i get 1.81847767202745*10^(-...

Yeah, i have tried evalf[10](sqrt(25)).
How can i get a simple number as answer? I'm loving the software but i just wished i could type in:
int(sin(x), x = 0 .. pi)
and get 2 instead of (2.739493386*10^(-116) + (2.739493386*10^(-116))*I)*pi.
Also, when i type evalf[50](pi), i wish to get all the 50 digits, but i just get \pi :/.

## some problems with maple...

i have a matrix named S. it has two variables with the names sigma1 and tau. i do some computations with these varibels to obtain a matrix named S_NEW. when i calculate S_NEW with parameters and then i substitute parameter tau with zero i got the answer a zero Matrix. but when i put tau=0 at the initiation of my code, i got another answer. what is the problem?

the second issue is related with the name of parametes in maple. when the varible has the name sigma1 (and tau=0), the matrix S_NEW is a matrix with the only component of (1,1). when i change the parameter name to sigma the matrix S_NEW is a matrix with the only component of (3,3). where is the problem?

 > restart:with(LinearAlgebra):
 > tau:=0;
 (1)
 > S:=Matrix(3,[[sigma1,tau,0],[tau,0,0],[0,0,0]]):B1:=Matrix(3):
 > A12,B12:=(Eigenvectors(S)):
 > V12:= Matrix(Normalize~([Column(B12,1..3)],Euclidean)):
 > S_NEW:=simplify(V12^+.S.V12) assuming real ;
 (2)
 > eval(S_NEW,tau=0)
 (3)
 >
 >
 >

## Physics package Determinant...

Hello,

I have installed the Physics Package with:

PackageTools:-Install("5137472255164416", version = 329, overwrite)

I have a question about the calculation of the Tensor determinant:

I use two ways to calculate the determinant of the same matrix:

The first with Physics package and the second with LinearAlgebra Package:

It is easy to calculate analytically the result it is : -1

But Physics Package gives : +1 and LinearAlgebra gives: -1

My question is why I found +1 with Physics Package : What I doing wrong ?.

**************************************************

restart

with(Physics)

Setup(coordinates = {X = [t, x, y, z]}, dimension = 4, metric = {(1, 1) = 1, (2, 2) = -1, (3, 3) = -1, (4, 4) = -1}, signature = +---, mathematicalnotation = true)

Define(H[mu, nu] = Matrix(4, {(1, 1) = 1+h, (1, 2) = h, (2, 2) = -1+h, (3, 3) = -1, (4, 4) = -1}, shape = symmetric))

H[]

H[determinant]

with(LinearAlgebra)

B := Matrix(4, {(1, 1) = 1+h, (1, 2) = h, (2, 2) = -1+h, (3, 3) = -1, (4, 4) = -1}, shape = symmetric)

Determinant(B)

***************************************

Sincerely yours

Xavier

## why rewriting the ODE changes it classification by...

This for me seems strange. A first oder ODE of degree one of form   A+B*y'=0. Asking Maple for its classification, it gives exact AND rational.  After rewriting it in the form y'=f(x,y) , now Maple says it is rational only. It no longer recognize it as exact.

How could this be possible? It is the same ODE, just rewrittng differently.  Maple 2019.1 on windows.

 > restart;
 > Typesetting:-Settings(typesetprime=true):

 > dsolve(ode)

 > new_ode:=convert(ode,D); #so I can solve for y' RHS:=solve(new_ode,D(y)(x));

 > dsolve(new_ode)

 >

## help list integer equation solve?...

 (1)

 (2)

 (3)

 (4)

i want to list variable m in integer number from solve?

Can you help me?

@acer

@Carl Love

## Equating multiple multivariate polynomials to find...

I want to solve for the coefficients in some multivariate polynomials by equating them to other known multivariate polynomials.

Something like this. I have

p[1]=(a+b)*x^2+(a+c)*x*y+d*z;

p[2]=(a-b)*x+e*y*z+f*z^2;

I want to impose that p[1]=x^2+2*x*y+3*z and that p[2]=x+4*y*z and I want Maple to tell me the values of (a,b,c,d,e,f).

Sounds simple enough, but I have not been able to do it

## How to solve initial Newton iteration is not conve...

I want to solve an ODE system numerically, but maple show not converge for iteration, can you give a solution
with(VectorCalculus);
with(linalg);

pi := 4; eta := 6; mh := .1; mv := .3; bh := .15; Nh := 400; Nv := 200; bv := .25; b := .8; d := .1; p := .5; B := 10; A := 1; alpha := .25; beta := .7; K := 400; r := .5; c := .9; q := .8; Sh0 := 225; Sv0 := 100; Ih0 := 175; Iv0 := 600; P0 := 50; T := 35; B := 10;

eq1 := diff(L1(t), t) = -L1(t)*(-bh*b*Iv(t)/Nh-mh)-L2(t)*bh*b*Iv(t)/Nh; eq2 := diff(L2(t), t) = -L2(t)*(-mh-d)+L3(t)*bv*b*Sv(t)/Nv-L4(t)*bv*b*Sv(t)/Nv; eq3 := diff(L3(t), t) = -(L4(t)*Iv(t)+L3(t)*Sv(t))*L3(t)/(2*B^2)-L3(t)*(-bv*b*Ih(t)/Nv-mv-L3(t)*Sv(t)/(2*B^2)-(L4(t)*Iv(t)+L3(t)*Sv(t))/(2*B^2)-P(t)*alpha)-L4(t)*(bv*b*Ih(t)/Nv-L3(t)*Iv(t)/(2*B^2))-L5(t)*P(t)*alpha; eq4 := diff(L4(t), t) = -A-(L4(t)*Iv(t)+L3(t)*Sv(t))*L4(t)/(2*B^2)+L1(t)*bh*b*Sh(t)/Nh-L2(t)*bh*b*Sh(t)/Nh+L3(t)*L4(t)*Sv(t)/(2*B^2)-L4(t)*(-mv-L4(t)*Iv(t)/(2*B^2)-(L4(t)*Iv(t)+L3(t)*Sv(t))/(2*B^2)-P(t)*alpha)-L5(t)*P(t)*alpha; eq5 := diff(L5(t), t) = L3(t)*Sv(t)*alpha+L4(t)*Iv(t)*alpha-L5(t)*(r*(1-P(t)/Nv)-P(t)*r/Nv+alpha*(Sv(t)+Iv(t))-q*c); eq6 := diff(Sh(t), t) = pi-bh*b*Sh(t)*Iv(t)/Nh-mh*Sh(t); eq7 := diff(Ih(t), t) = bh*b*Sh(t)*Iv(t)/Nh-mh*Ih(t)-d*Ih(t); eq8 := diff(Sv(t), t) = eta-bv*b*Sv(t)*Ih(t)/Nv-mv*Sv(t)-P(t)*Sv(t)*alpha-L3(t)*Sv(t)^2/(2*B^2)-L4(t)*Sv(t)*Iv(t)/(2*B^2); eq9 := diff(Iv(t), t) = -L3(t)*Sv(t)*Iv(t)/(2*B^2)+bv*b*Sv(t)*Ih(t)/Nv-mv*Iv(t)-P(t)*Iv(t)*alpha-L4(t)*Iv(t)^2/(2*B^2); eq10 := diff(P(t), t) = P(t)*r*(1-P(t)/Nh)+P(t)*alpha*(Sv(t)+Iv(t))-q*P(t)*c

fcns := {Ih(t), Iv(t), L1(t), L2(t), L3(t), L4(t), L5(t), P(t), Sh(t), Sv(t)}; a := dsolve({eq1, eq10, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, Ih(0) = Ih0, Iv(0) = Iv0, L1(T) = 0, L2(T) = 0, L3(T) = 0, L4(T) = 0, L5(T) = 0, P(0) = P0, Sh(0) = Sh0, Sv(0) = Sv0}, fcns, type = numeric);
fcns := {Ih(t), Iv(t), L1(t), L2(t), L3(t), L4(t), L5(t), P(t),

Sh(t), Sv(t)}
Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging



## Solving a differential equation (relies on linear ...

Hello forums,

I appreciate all the help that has been given to me throughout the past months.  I'm trying to solve a differential equation that involves a matrice in it.  I'm not sure if I am entering in the problem in correctly nor do I know what commands to use.  Can someone please be of assistance and teach me?

Thanks

William

Solving_a_linear_algebra_differential_equation.mw

 First 580 581 582 583 584 585 586 Last Page 582 of 2357
﻿