vv

13867 Reputation

20 Badges

9 years, 352 days

MaplePrimes Activity


These are answers submitted by vv

1. An equality such as your sys1 cannot be minimized.

2. E.g.  (-0.99)^(2.3)  is not real, is it?

The problem reduces to show that a "reduced" quadratic form is negative definite.
(see e.g.  Ruszczynski A., Nonlinear optimization, PUP, 2006, p. 149).

hessian-question-max-ok.mw

 

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.

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