vv

13837 Reputation

20 Badges

9 years, 321 days

MaplePrimes Activity


These are answers submitted by vv

To test whether a matrix A is positive/negative semidefinite one may use the LinearAlgebra commands

LinearAlgebra:-IsDefinite(A, 'query' = 'positive_semidefinite');
LinearAlgebra:-IsDefinite(A, 'query' = 'negative_semidefinite');

It is also possible to compute the minors (Sylvester theorem, the semidefinite case) but for a matrix of order
n there are 2^n - 1 such minors, so the method is very inefficient.

 

 

 

E.g. (by hand):

It seems that you are using plotsetup(char);

To restore the defaults, use

plotsetup(default);

You must be aware that a series structure is obtained only using the series command, e.g.

series(exp(z),z,3);
   
1+z+(1/2)*z^2+O(z^3);

But if your input is

1+z+(1/2)*z^2+O(z^3);

this is no longer a series; it's a sum of 4 terms and O is now simply a symbol.

Edit. Note also that the command  MultiSeries:-multiseries  uses another structure named SERIES; this is more general because it can use other "scales".

 

fsolve finds multiple roots only for polynomials.
In your case you may use solve (because the equation can be solved exactly i.e. symbolically) or RootFinding
(there are other possibilities).

f:=x -> 3.2+0.4*sin(1.25*x);  #   0<x<5,  f(x)=3.5

proc (x) options operator, arrow; 3.2+.4*sin(1.25*x) end proc

(1)

solve({f(x)=3.5, x>0, x<5},x, allsolutions, explicit);

{x = .6784496632}, {x = 1.834824460}

(2)

RootFinding:-Analytic( f(x)-3.5, x, 0-I/100 .. 5+I/100 );

1.83482445968662, .678449663185185

(3)

 


 

Download rootfinding.mw

Try to include the path in the filename.

P:=sort(E,output=permutation);
E__sorted:=E[P];
Q__sorted:=(Q^+)[P]^+;

 

   Use   dsolve.

You must first express it in terms of y1 and y1'.

y1tt := rhs(isolate(eq1, diff(y[1], t, t))):
plots:-odeplot(sol,[t,y1tt],t=0..10);

 

convert inserts \n  and it is correct from Maple's point of view because white spaces are ignored by the parser.

You can remove them saving e.g. the string
StringTools:-DeleteSpace(result_as_string):

 

1) procedures use last name evaluation, so, eval must be used.
2) nonIdMaps is [f,f]  and now  f is the last index of the loop, i.e.  x -> 3*x
 

nonIdMaps := []:
for f in [x -> x,x -> 2*x,x -> 3*x] do
   eval(f),f(y);
   if f(y) <> y then nonIdMaps := [nonIdMaps[],eval(f)] end if
end do;
nonIdMaps,map(f -> f(y),nonIdMaps);

works as expected.

Your t should be x (probably, otherwise x is a parameter).
Do you have an initial condition? It seems that the ODE has not real solutions (y should be >0).

I very seldom use Physics, but it seems that a prefix acts only if the rest of the name is  n  or  __n,
n containing only decimal digits.

Obviously y > 0.

a) For x>0 the inequality reduces to some

x^2 < f(y).

b) For x<0 the signum of the denominator   x+0.015*y^(1.2)  must be considered too.

It should be easy to start from here.

 

I think that RealDomain has a very limited applicability. I prefer not to use it.
It redefines several standard functions. For example,

exp(I*t);
       undefined

Why do you want to use it with Statistics?
 

First 86 87 88 89 90 91 92 Last Page 88 of 120