Markiyan Hirnyk

Markiyan Hirnyk
8 years, 244 days


These are answers submitted by Markiyan Hirnyk

The sum of f(seq(k[i],i=1..m)) over k[i]=rang[i], i=1..m, equals the integral

.

For example,

restart; m := 3;
f :=  (x,y,z)-> x ^2 + y *z:
rang[1] := 1 .. 6; rang[2] := 5 .. 9; rang[3] := 2 .. 4;
VectorCalculus:-int(f(seq(floor(k[i]), i = 1 .. m)), [seq(k[i], i = 1 .. m)] = Parallelepiped(seq(op(1, rang[j]) .. op(2, rang[j])+1, j = 1 .. m)));

                              3255

add(add(add(f(seq(k[i],i=1..m)),k[1]=rang[1]),k[2]=rang[2]),k[3]=rang[3])

                              3255

The formula is somewhat more complex in the case of noniteger ends of rangs (range is reserved here). I leave it on your own.

 

By plottools:-transform

July 17 2014 Markiyan Hirnyk 5958
0 0

Here is an example in your linear case.


M := LinearAlgebra:-RandomMatrix(10)

Matrix([[-79, -85, -29, 13, -25, -94, -19, -97, 10, 10], [75, -85, 9, 32, 78, 27, -55, -38, -44, -61], [-85, 19, 81, 48, 23, 18, 71, -36, 26, -26], [-19, 25, 35, -60, -67, 18, -50, -69, -3, -20], [57, 17, 80, 51, 28, 63, -17, 69, -62, -78], [83, 81, 20, 20, -81, 86, 35, -15, -83, -4], [-45, 89, 39, -46, -36, -51, -26, 2, 9, 5], [68, 92, -35, 35, -88, 51, -86, -88, 88, -91], [58, -2, 26, -54, 91, 38, 50, 99, 95, -44], [-43, -46, -74, -17, -62, -38, -94, -59, 63, -38]])

(1)

with(plots):

with(plottools):

f := transform(proc (x, y) options operator, arrow; [2*x+1, y-3] end proc):

 

 

display(f(A), axes = frame, gridlines = false)

 

``


Download tickmarks.mw

 

 

Up to Maple Help to the solve command, "The solve command solves one or more equations or inequalities for their unknowns". It does not directly work with the <> relation. Thus, one should replace cos(x)<>0 by cos(x)>0 or cos(x)<0:

.

PS. The solve(cos(x)<>0) (or more generally solve(f(x)<>0) command is not documented.

 

 

 

Explanation

July 14 2014 Markiyan Hirnyk 5958
0 0

Maple is right: the improper integral

int(3*cos(2000*Pi*t)*exp(-(I*2)*Pi*f*t), t = -infinity .. infinity)

is undefined. The Fourier transform of 3*cos(2000*Pi*t) exists in the sense of the distributions only (see http://en.wikipedia.org/wiki/Fourier_transform , Distributions, formula 304 for info). The  commands of the inttrans package take the values from the implemented tables, not finding the corresponding integrals, in many cases.

 

In one line

July 04 2014 Markiyan Hirnyk 5958
1 0

Optimization:-Maximize(t -> abs(rhs(Sol(t)[4]-Sol(t)[3])) , 0 .. 10);

 [HFloat(0.4784126039746871),[ 1.55119226485395]]

Variation on theme

July 03 2014 Markiyan Hirnyk 5958
1 0

Similar questions were asked and answered few times.  The problem is caused by the big coefficients (about 10^151). Therefore,

nops(ALPHA);
                               8
eval(lhs(A)-rhs(A), alpha = ALPHA[1]);
                                 
                        6.758322 10  ^(-253) 
Hope you will find the corresponding betas on your own.

 

By PolynomialIdeals

July 02 2014 Markiyan Hirnyk 5958
0 0

Another way consists in the use of the PolynomialIdeals package. For example,

with(PolynomialIdeals):
J := <80*y^8+68*y^6+12*y^4-4*y^2-1>;
K := <1200*y^18+1120*y^17+1260*y^16+1512*y^15+944*y^14+1764*y^13+1492*y^12+1460*y^11+1021*y^10+1814*y^9+1233*y^8+1097*y^7+837*y^6+154*y^5+139*y^4-70*y^3-53*y^2-16*y-13>;
IdealContainment(K, J);
                              true


Numerically

July 02 2014 Markiyan Hirnyk 5958
1 5

This can be done in such a way.


restart; f := proc (x, a) options operator, arrow; int(1/(1-exp(a*t)*erfc(a*t)), t = .1 .. x, numeric) end proc

f(.4, -5)

.9870236604

(1)

plot(proc (x) options operator, arrow; f(x, -5) end proc, .1 .. .5, gridlines = false)

 

plot3d(proc (x, a) options operator, arrow; f(x, a) end proc, .1 .. .4, .1 .. 1)

 

``


Download numeric.mw

Reference

June 27 2014 Markiyan Hirnyk 5958
0 0

Look in http://www.mapleprimes.com/posts/100884-Precision-And-Plot-Drivers

Maybe, the following will be enough for you:

restart; Digits := 100; with(Statistics):
X := RandomVariable(Normal(0, 1)):
plots:-logplot(PDF(X, t), t = 2 .. 37);

Another way is

June 27 2014 Markiyan Hirnyk 5958
2 2

as follows.

f := n ->ListTools:-FindMaximalElement(PolynomialTools:-CoefficientList(expand((1+2*x)^n), x), position)[2]-1 :

DirectSearch:-Search(n -> (f(n)-8)^2 , {n >= 1}, assume = posint);

Hint

June 26 2014 Markiyan Hirnyk 5958
1 0

You might take a look at ?quo/rem . Good luck!

Likely impossible

June 26 2014 Markiyan Hirnyk 5958
0 1

I think this(PS. The more general question is How do you convert a "random variable" (as that term is used by the Statistics package) into a "stochastic process" (as that term is used by the Finance package).) is impossible in view of http://www.maplesoft.com/support/help/Maple/view.aspx?path=Finance/StochasticProcesses .

Maple Help

June 26 2014 Markiyan Hirnyk 5958
1 1

Look in ?plottools and ?textplot. You can achieve that in your Maple Help by typing ?ploottools or/and ?textplot in your worksheet and then by the Enter key. Also Maple Plotting Guide is useful to this end.

By DirectSearch

June 26 2014 Markiyan Hirnyk 5958
0 3

As far as I understand it, the requested problem is  auxiliary to the multiobjective problem:

minimize f=[f1,f2]

under the constraints

gj <=0, j=1..3.

This principal problem can be solved by the CompromizeProgramming command of the DirectSearch package:

f1 := -2*x1-x2; f2 := -x1-4*x2; g1 := 2*x1+3*x2-6; g2 := -x1; g3 := -x2;
with(DirectSearch):
CompromiseProgramming([f1, f2], {g1 <= 0, g2 <= 0, g3 <= 0});

The DirectSearch package should be downloaded and installed in your Maple (>=12). See

 

for info.

Example

June 26 2014 Markiyan Hirnyk 5958
0 2

Here is an example.

a := Vector(5, i -> i+1 ):
b := Vector(6, i -> i^2 ):
with(plots):
display(listplot(a, color = red), listplot(b, color = blue), style = point, gridlines = false);


If you prefer lines, then omit the style=point option.

Download example1.mw

1 2 3 4 5 6 7 Last Page 1 of 116