vv

3082 Reputation

9 Badges

2 years, 61 days

MaplePrimes Activity


These are answers submitted by vv

rel:=simplify(tan((x-t)/(alpha*(t^2+1)))-t);

-tan((-x+t)/(alpha*(t^2+1)))-t

(1)

alpha:=1/2;

1/2

(2)

X:=solve(rel,x);

(1/2)*t^2*arctan(t)+t+(1/2)*arctan(t)

(3)

t1:=fsolve(X=1);

.6177384029

(4)

evalf(Int(1/(1+t^2)*diff(X,t),t=0..t1));

.8903158470

(5)

 

Edit: without a change (i.e. directly):

restart;
rel:=simplify(tan((x-t)/(alpha*(t^2+1)))-t):
alpha:=1/2:
T:=solve(rel,t):
Int(1/(1+T^2),x=0..1):
evalf(%);

       .8903158471

R:=i -> RootOf(_Z^9-28*_Z^8+328*_Z^7-2088*_Z^6+(-2*cos(y)-2*cos(x)+7852)*_Z^5+(28*cos(y)+28*cos(x)-17768)*_Z^4+(-152*cos(y)-152*cos(x)+23632)*_Z^3+(408*cos(y)+408*cos(x)-17232)*_Z^2+(-12*cos(x)*cos(y)-540*cos(y)-540*cos(x)+5844)*_Z+32*cos(x)*cos(y)+256*cos(y)+256*cos(x)-544, index=i):
plot3d([seq(R(i),i=1..2)], x=0..2*Pi,y=0..2*Pi);

For the second situation you must use

f__c:=unapply(piecewise(cnd, 1, not cnd, 0),  x__0, y__0);

That's due to the evaluation rules for procedures. But in essence, x__0, y__0 in cnd are global variables, distinct from those in proc(x__0,y__0); they are just "homonymes".

The sum is computed correctly to polylog(1/2, -1) + 1
Instead of stopping here, Maple tries to use
    polylog(a, z) + polylog(a, -z) = 2^(1-a)*polylog(a, z^2)
for z=1 ==> division by 0.

 

In the DynamicSystems package Sinc() depends on the global variable t. So, you must use t for its value. For t=0, Sinc is not defined and generates an error.

with(DynamicSystems):
Sinc();
     
sin(Pi*t)/(Pi*t)

eval(Sinc(),t=1);
   
0

eval(Sinc(),t=0);
Error, numeric exception: division by zero

limit(Sinc(), t=0);
    1

eval(Sinc(), t=0.0001);
   
.9999999834

 

 

 

 

The approximation of the sum of a series is an almost impossible task.
So, I can understand that Maple is counting on the user's ability to use add (and assume the responsibility!).

Otherwise, we obtain:

evalf( Sum(piecewise(n<29,1/n^2,1/n), n=1..infinity) );
    unevaluted

evalf( Sum(piecewise(n<30,1/n^2,1/n), n=1..infinity) );
   
1.644934067

 

 

 

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 2 3 4 5 6 7 Last Page 1 of 39