vv

13922 Reputation

20 Badges

10 years, 10 days

MaplePrimes Activity


These are answers submitted by vv

Actually you have computed  J(F)' . Grad(G)
where J demotes the Jacobian and ' is the transpose.
You may use the VectorCalculus package which works for n variables and any coordinate system:

 

restart;

with(VectorCalculus):

J:=Jacobian([f(x,y,z,t),g(x,y,z,t),h(x,y,z,t),k(x,y,z,t)], [x,y,z,t]);

_rtable[18446744074328080502]

(1)

dG:=Matrix(Gradient(G(x,y,z,t),[x,y,z,t]));

_rtable[18446744074369828734]

(2)

J^+ . dG;

_rtable[18446744074369819342]

(3)

 


Download J.mw

Here is a procedure (not tested enough).
The system must be polynomial with rational coefficients.

solpart:=proc(sys::list(relation))
local i,r1,r2,rez:=NULL, sd:=SolveTools:-SemiAlgebraic(sys);
#print(sd);
if sd=[] then return [] else sd:=sd[1] fi;
for i to nops(sd) do
   r1:=eval(sd[i],[rez]); 
   if type(r1,`=`) then rez:=rez,r1; next; fi;
   if i=nops(sd) then
     if     type(rhs(r1),realcons) then rez:=rez,lhs(r1)=rhs(r1)-1
     elif   type(lhs(r1),realcons) then rez:=rez,rhs(r1)=lhs(r1)+1
     else error "Strange1"; fi;
   return rez;
   fi; 
   
   r2:=eval(sd[i+1],[rez]);   #print([r1,r2]);
   if    type(rhs(r1),name) and (rhs(r1)=lhs(r2)) then i:=i+1; rez:=rez, rhs(r1)=eval((lhs(r1)+rhs(r2))/2,[rez]) 
   elif  type(lhs(r1),name) and (lhs(r1)=rhs(r2)) then i:=i+1; rez:=rez, lhs(r1)=eval((rhs(r1)+lhs(r2))/2,[rez])
   elif  type(rhs(r1),realcons) then rez:=rez,lhs(r1)=rhs(r1)-1
   elif  type(lhs(r1),realcons) then rez:=rez,rhs(r1)=lhs(r1)+1
   else error "Strange2"; fi;
od;
rez
end:

solpart([x*y-1<=0, x>0, y > 1]);
       
y = 2, x = 1/4

solpart([x*y-1<0, x>0, y >= 1]);
       
y = 1, x = 1/2

 

f:=proc(n::posint,i)
   local k, s:=add(i[k],k=1..n), p:=mul(i[k],k=1..n);
   add(p/i[k]*(s-i[k]), k=1..n)
end:

f(4,i);
      

In Maple it is difficult to control the order of the terms in a sum (the sort command is mainly for polynomials).  
Maple does this for efficiency reasons; after all it was designed for computations rather than typesetting (where LaTeX is anyway the preferred tool by mathematicians).

In recent versions it offers however many typesetting options (see ?Typesetting).

 

Another method would be to use InertForm, but I am not sure whether it exists/works in Maple 13.

 

restart;

p:=A/(s+1)+B/(s-2)+C/(s+3);

A/(s+1)+B/(s-2)+C/(s+3)

(1)

with(InertForm):

ip:=MakeInert(p):

ip1:=subs([A=4/15,B=8/15,C=-3/10],ip);

`%+`(`%/`(4/15, `%+`(s, 1)), `%/`(8/15, `%+`(s, -2)), `%/`(-3/10, `%+`(s, 3)))

(2)

Display(ip=ip1);

`%+`(`%/`(A, `%+`(s, 1)), `%/`(B, `%+`(s, -2)), `%/`(C, `%+`(s, 3))) = `%+`(`%/`(4/15, `%+`(s, 1)), `%/`(8/15, `%+`(s, -2)), `%/`(-3/10, `%+`(s, 3)))

(3)
Int(1/(sqrt(t^4+1)+t^2), t = 1 .. infinity):
% = value(%);
evalf(%); #check

        0.4799537050 = 0.4799537050

Such a system will have generally 2^18 = 262144 solutions.
E.g. the simple one
{seq(x[k]^2=1,k=1..18)};

has exactly 2^18 solutions (all are real). For a more realistic system each solution will be huge.
So, you have no chance. You can at most use fsolve to find some of them.

 

 

 

solve(convert(eq-K,list));

You should use simply  sol(1);

If you really want such a manipulation, use:

eval('''sol'''(x), [x = X]);
eval(%, X=1);

 

This is not related to Special Relativity.

solve([2*x=6, y=2], x);
has no solutions because y is seen as a parameter. Only when y=2 a solution exists.
You may see this using

solve([2*x=6, y=2], x, parametric);

 

Of couse the system can be solved wrt all the variables:
solve([2*x=6, y=2], [x,y]);   # or    solve([2*x=6, y=2]);
      [[x = 3, y = 2]]

 

 

 

1. Strangely, for name instead of symbol it works.

3. Workaround:

e:=hypergeom([], [], a)+hypergeom([], [], b):
E:=subs(hypergeom=HG,e):
applyrule(HG(x1::anything, x2::anything, a) = 0, E):
subs(HG=hypergeom,%);

Or, use %hypergeom.

You have overlapping patterns, so both

    true, [x = 2]
    true, [y = 2]

are correct.

For uniqueness use e.g.

typematch({2}, set({x :: odd, y :: even}), 's'); s;

 

 

 

 

Yes, it seems to be a bug. It should give an error as in:
C:=Matrix(B);
A.C;

You mean divide a m-dimensional cube into n^m congruent cubes.

 

Cubes:=proc(m,n) # for the unit cube in R^m
local k,u,T,C;
T:=combinat:-cartprod([[seq(k/n, k=0..n-1)] $ m ]):
C:=('T[nextvalue]()')$(n^m):
seq( [u, 1/n +~ u], u=[C])
end:

Cubes(2,2);
 

[[0, 0], [1/2, 1/2]], [[0, 1/2], [1/2, 1]], [[1/2, 0], [1, 1/2]], [[1/2, 1/2], [1, 1]]

(1)

Cubes(2,4);

[[0, 0], [1/4, 1/4]], [[0, 1/4], [1/4, 1/2]], [[0, 1/2], [1/4, 3/4]], [[0, 3/4], [1/4, 1]], [[1/4, 0], [1/2, 1/4]], [[1/4, 1/4], [1/2, 1/2]], [[1/4, 1/2], [1/2, 3/4]], [[1/4, 3/4], [1/2, 1]], [[1/2, 0], [3/4, 1/4]], [[1/2, 1/4], [3/4, 1/2]], [[1/2, 1/2], [3/4, 3/4]], [[1/2, 3/4], [3/4, 1]], [[3/4, 0], [1, 1/4]], [[3/4, 1/4], [1, 1/2]], [[3/4, 1/2], [1, 3/4]], [[3/4, 3/4], [1, 1]]

(2)

Cubes(3,2);

[[0, 0, 0], [1/2, 1/2, 1/2]], [[0, 0, 1/2], [1/2, 1/2, 1]], [[0, 1/2, 0], [1/2, 1, 1/2]], [[0, 1/2, 1/2], [1/2, 1, 1]], [[1/2, 0, 0], [1, 1/2, 1/2]], [[1/2, 0, 1/2], [1, 1/2, 1]], [[1/2, 1/2, 0], [1, 1, 1/2]], [[1/2, 1/2, 1/2], [1, 1, 1]]

(3)

 

Edit: In Maple 15, probably
seq( [u, 1/n +~ u], u=[C])
must be replaced by
seq( [u, map(t->t+1/n, u)], u=[C])

 

 

The problem seems to be an escaped internal local variable.

restart;

diff(int(1/(1+exp(1/(x-u))), u = 0 .. x), x);

diff(int(1/(1+exp(1/(x-u))), u = 0 .. x), t)

(1)

indets(%,name) minus {x,u};

{t}

(2)

evalb(%[] = t);

false

(3)

 

You should check whether it is fixed in the development library; see:
https://www.mapleprimes.com/questions/222498-Issues-With-Pdsolve

First 81 82 83 84 85 86 87 Last Page 83 of 120