Markiyan Hirnyk

Markiyan Hirnyk

7228 Reputation

25 Badges

11 years, 334 days

MaplePrimes Activity


These are answers submitted by Markiyan Hirnyk

The difficulty consists in the nonstandard IC. In order to get over the difficulty, we make the change of the variables.

PDE := (y-u(x, y))*(diff(u(x, y), x))+(u(x, y)-x)*(diff(u(x, y), y)) = x-y;:
solve({eta = y-1/x, xi = x}, {x, y});

{x = xi, y = (eta*xi+1)/xi}
                  
with(PDEtools): 
 tr := {x = xi, y = eta+1/xi}:
PDE1 := normal(dchange(tr, PDE, simplify));

PDE1 := -(u(xi, eta)*(diff(u(xi, eta), xi))*xi^3-(diff(u(xi, eta), eta))*xi^3*u(xi, eta)-
(diff(u(xi, eta), xi))*eta*xi^3+(diff(u(xi, eta), eta))*xi^4+u(xi, eta)*(diff(u(xi, eta),
 eta))*xi-(diff(u(xi, eta), xi))*xi^2-(diff(u(xi, eta), eta))*eta*xi-(diff(u(xi, eta), eta)))/xi^3 =
-(eta*xi-xi^2+1)/xi

 The condition u(x,1/x)=0 transforms to u{xi,0)=0. It is clear that a symbolic solution of PDE1 with that condition has no chance. Therefore we make use of the numeric option, adding the condition u(0,eta)=0).

ans := pdsolve({PDE1}, {u(0, eta) = 0, u(xi, 0) = 0}, numeric, time = xi, range = 0 .. 1);
                         ans := module() ... end module
ans:-plot3d(xi = 0 .. 1, eta = 0 .. 1);

pde.mw

in view of

restart;
PDE := (y-u(x, y))*(diff(u(x, y), x))+(u(x, y)-x)*(diff(u(x, y), y)) = x-y:
infolevel[pdsolve] := 3: 
ans := pdsolve(PDE, HINT = sum);
HINT = sum
Trying HINT = sum
Warning: System is inconsistent

PS. or a bug in pdsolve.

The following works for me.

abs(simplify(convert(-((-(1/20)*sqrt(5)-1/20)*cos((1/5)*Pi)-
(1/20)*sqrt(2)*sqrt(5-sqrt(5))*sin((1/5)*Pi))*24^(1/5)*5^(3/5)-
I*((1/20)*sqrt(2)*sqrt(5-sqrt(5))*cos((1/5)*Pi)+(-(1/20)*sqrt(5)-1/20)*sin((1/5)*Pi))*24^(1/5)*5^(3/5), radical)));

(1/5)*24^(1/5)*5^(3/5)

The command convert/radical may be omitted, but the result is more complicated in this case.

abs.mw

op(1, 1490.90920124091 .. 1497.18170785000);
                        1490.90920124091
op(2, 1490.90920124091 .. 1497.18170785000);
                        1497.18170785000

so use

op(1,OneSampleZTest(S,mu,sdev,confidence=0.95,output='confidenceinterval'));
op(2,OneSampleZTest(S,mu,sdev,confidence=0.95,output='confidenceinterval'));

to this end.

is treated as 1 (one). Therefore,

convert(hypergeom([], [], z),elementary);
  exp(z)

 

The Quantile command does the job:

restart; 
with(Statistics):
X := RandomVariable(Poisson(2.6)):
Quantile(X, .95);
                               5.

 

See the first example in  ?intersectplot to this end.

This works for me

int((x^2+y^2)*piecewise(y-x-1/2 <= 0 and y+2*x-2 <= 0 and y+(1/2)*x-1/2 >= 0, 1, 0), 
[x = 0 .. 1, y = 0 .. 1]);
                            7/32

 

Let us consider Int(exp(LambertW(1/(-1+x))*(-1+x)), x)+1. First, the term 1 is of no importance. Second, let us consider the int(exp(LambertW(1/(-1+x))*(-1+x)), x = 1 .. t) command instead of an inert Int one. Third,

FunctionAdvisor(branch_cuts, exp(LambertW(1/(-1+x))*(-1+x)), plot = 2.);

[exp(LambertW(1/(-1+x))*(-1+x)), And(-exp(1)+1 < x, x < 1)]

says the integrand is a complex-valued function with branch points. Because of this,

a := Re(int(exp(LambertW(1/(-1+x))*(-1+x)), x = 1 .. t)):
plot(a, t = 0 .. 2, numpoints = 5, thickness = 3);

int(exp(LambertW(1/(-1+x))*(-1+x)), x = 1 .. 2.1);
                          1.670860297   
int(exp(LambertW(1/(-1+x))*(-1+x)), x = 1 .. -2.1+1.*I);
                  -7.784875149 - 3.643815590 I
                                                         

int_of_Lambert.mw

 

 

 

This can be done as follows (The DirectSearch package should be downloaded from http://www.maplesoft.com/applications/view.aspx?SID=101333 and installed in your Maple >=12.).

sol4 := DirectSearch:-SolveEquations([sol1, sol2], {T = 0 .. .4}, AllSolutions, solutions = 4);
sol4 := Matrix(1, 4, [[0.1040897473e-19, 
Vector[column](2, [-0.6873203012e-10, -0.7539816154e-10]), 
[T = .321611763404719, W = 29.4643511745074], 1013]])

The plot produced by

plots:-implicitplot([sol1, sol2], T = 0 .. 5, W = 0 .. 50, gridrefine = 2, color = [blue, red]);

confirms the answer.

system.mw

This can be done in such a way:

with(Statistics):
X := RandomVariable(DiscreteUniform(i-x, i+x)):
Mean(X);
                               i
Variance(X);
   
(1/12)*(i-x)^2+(1/12)*(i+x)^2+(1/3)*x-(1/6*(i-x))*(i+x)
i := 6:x := 11:
Sample(X,6);
Vector[row](6, [13., 15., -3., 16., 9., -3.])

 

This is not so simple. Here is one way. We start from plotting 

restart; plots:-implicitplot(t^8+s^6+s*t^5 = 1, s = -10 .. 10, t = -10 .. 10, gridrefine = 2);

We see two almost vertical pieces. This means that a small change of s implies a relatively big change of t.

Now we find the range of t by

Optimization:-Maximize(t, {t^8+s^6+s*t^5 = 1})[1];
                      1.08827028359556088

Then we solve

sol := solve(t^8+s^6+s*t^5 = 1);
sol := {s = RootOf(t^8+_Z^6+_Z*t^5-1), t = t}
allvalues(sol);  
 {s = RootOf(t^8+_Z^6+_Z*t^5-1, index = 1), t = t},
 {s = RootOf(t^8+_Z^6+_Z*t^5-1, index = 2), t = t}, 
 {s = RootOf(t^8+_Z^6+_Z*t^5-1, index = 3), t = t}, 
 {s = RootOf(t^8+_Z^6+_Z*t^5-1, index = 4), t = t},
 {s = RootOf(t^8+_Z^6+_Z*t^5-1, index = 5), t = t},
 {s = RootOf(t^8+_Z^6+_Z*t^5-1, index = 6), t = t}    

and build the parametric plots, substituting the above in

x := t*cos(t^2+s); y := s^3-sin(t);
Digits := 15; [seq(plot([eval(x, allvalues(sol)[j]), eval(y, allvalues(sol)[j]),
t = -1.08827028359556088 .. 1.08827028359556088], thickness = 2), j = 1 .. 6)];
plots:-display(%);

The result is not satisfactory for me: we obtain two warnings

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
and a somewhat srange plot

which includes a superfluous interval and two breaks. I think the first one is caused by Indexed RootOf (especially by s = RootOf(t^8+_Z^6+_Z*t^5-1, index = 1) ) and the second one is caused by roundoff errors which produce complex numbers (Hope Maple developers will shed light on it.). 

In oder to overcome the first deficiency, I do the following (The problem with sol[1] and t = -1 were found through trial-and-error method.).

a := plot([eval(x, allvalues(sol)[1]), eval(y, allvalues(sol)[1]),
t = -1.08827028359556088 .. -1], thickness = 2, numpoints = 500):
b := plot([eval(x, allvalues(sol)[1]), eval(y, allvalues(sol)[1]),
t = -.99 .. 1.08827028359556088], thickness = 2, numpoints = 500):
plots:-display([seq(plot([eval(x, allvalues(sol)[j]), eval(y, allvalues(sol)[j]),
t = -1.08827028359556088 .. 1.08827028359556088], thickness = 2, numpoints = 500),
j = 2 .. 6), a, b]);

and

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
parametric_plot.mw

can be obtained in such a way.

expr := 1/(u+v)^2+4*u*v-1:
normal(expr);
 (4*u^3*v+8*u^2*v^2+4*u*v^3-u^2-2*u*v-v^2+1)/(u+v)^2         

Let us plot it in the positive quadrant:

plots:-implicitplot(numer(normal(expr)) = 0, u = 0 .. 8, v = 0 .. 8, gridrefine = 2, thickness = 2);

Now

A := RealDomain:-solve(numer(normal(expr)) = 0, v);
(1/12)*(16*u^4-8*(64*u^6+48*u^4+12*sqrt(-192*u^6-144*u^4+288*u^2-3)*u-204*u^2+1)^(1/3)*u^2+(64*u^6+48*u^4+12*sqrt(-192*u^6-144*u^4+288*u^2-3)*u-204*u^2+1)^(2/3)+8*u^2+(64*u^6+48*u^4+12*sqrt(-192*u^6-144*u^4+288*u^2-3)*u-204*u^2+1)^(1/3)+1)/(u*(64*u^6+48*u^4+12*sqrt(-192*u^6-144*u^4+288*u^2-3)*u-204*u^2+1)^(1/3))                                                                                              

For example,

eval(A, u = 2);
(1/24)*(289-31*(4049+24*sqrt(-13443))^(1/3)+(4049+24*sqrt(-13443))^(2/3))/(4049+24*sqrt(-13443))^(1/3)
evalf(%);
                                            
              0.09656230030 + 2.101279539 10 ^(-10)   I

Let us chek it by plotting

plot(A, u = 1 .. 8);

Because expr is symmetric in u and v, the rest is clear.

 

One can solve this system analitically by the command of Maple 2016.2

solve({-5 <= 4*y1+2*y2+3*y3, -2 <= 3*y1+5*y2+2*y3, -1 <= y1+2*y2+y3, 0 <= y2, y1 <= 0}, {y1, y2, y3});

{y2 = 0, y3 = -(3/2)*y1-1, y1 < -2}, {y2 = 0, y1 < -2, -(3/2)*y1-1 < y3}, {y1 = -2, y2 = 0, 2 <= y3}, {y2 = 0, y3 = -(3/2)*y1-1, -2 < y1, y1 < 0}, {y2 = 0, -2 < y1, y1 < 0, -(3/2)*y1-1 < y3}, {y1 = 0, y2 = 0, -1 <= y3}, {y3 = -1-(3/2)*y1-(5/2)*y2, 0 < y2, y1 < -2+4*y2, y2 < 4/11}, {0 < y2, y1 < -2+4*y2, y2 < 4/11, -1-(3/2)*y1-(5/2)*y2 < y3}, {y1 = -2+4*y2, y3 = 2-(17/2)*y2, 0 < y2, y2 < 4/11}, {y1 = -2+4*y2, 0 < y2, y2 < 4/11, 2-(17/2)*y2 < y3}, {y3 = -1-(3/2)*y1-(5/2)*y2, 0 < y2, y1 < -y2, y2 < 4/11, -2+4*y2 < y1}, {0 < y2, y1 < -y2, y2 < 4/11, -2+4*y2 < y1, -1-(3/2)*y1-(5/2)*y2 < y3}, {y1 = -y2, y3 = -y2-1, 0 < y2, y2 < 4/11}, {y1 = -y2, 0 < y2, y2 < 4/11, -y2-1 < y3}, {y3 = -1-y1-2*y2, 0 < y2, y1 < 0, y2 < 4/11, -y2 < y1}, {0 < y2, y1 < 0, y2 < 4/11, -y2 < y1, -1-y1-2*y2 < y3}, {y1 = 0, y3 = -2*y2-1, 0 < y2, y2 < 4/11}, {y1 = 0, 0 < y2, y2 < 4/11, -2*y2-1 < y3}, {y2 = 4/11, y3 = -21/11-(3/2)*y1, y1 < -6/11}, {y2 = 4/11, y1 < -6/11, -21/11-(3/2)*y1 < y3}, {y1 = -6/11, y2 = 4/11, -12/11 <= y3}, {y2 = 4/11, y3 = -21/11-(3/2)*y1, -6/11 < y1, y1 < -4/11}, {y2 = 4/11, -6/11 < y1, y1 < -4/11, -21/11-(3/2)*y1 < y3}, {y1 = -4/11, y2 = 4/11, -15/11 <= y3}, {y2 = 4/11, y3 = -19/11-y1, -4/11 < y1, y1 < 0}, {y2 = 4/11, -4/11 < y1, y1 < 0, -19/11-y1 < y3}, {y1 = 0, y2 = 4/11, -19/11 <= y3}, {y3 = -1-(3/2)*y1-(5/2)*y2, 4/11 < y2, y1 < -2+4*y2, y2 < 2/5}, {4/11 < y2, y1 < -2+4*y2, y2 < 2/5, -1-(3/2)*y1-(5/2)*y2 < y3}, {y1 = -2+4*y2, y3 = 2-(17/2)*y2, 4/11 < y2, y2 < 2/5}, {y1 = -2+4*y2, 4/11 < y2, y2 < 2/5, 2-(17/2)*y2 < y3}, {y3 = -1-(3/2)*y1-(5/2)*y2, 4/11 < y2, y1 < -y2, y2 < 2/5, -2+4*y2 < y1}, {4/11 < y2, y1 < -y2, y2 < 2/5, -2+4*y2 < y1, -1-(3/2)*y1-(5/2)*y2 < y3}, {y1 = -y2, y3 = -y2-1, 4/11 < y2, y2 < 2/5}, {y1 = -y2, 4/11 < y2, y2 < 2/5, -y2-1 < y3}, {y3 = -1-y1-2*y2, 4/11 < y2, y1 < 4-11*y2, y2 < 2/5, -y2 < y1}, {4/11 < y2, y1 < 4-11*y2, y2 < 2/5, -y2 < y1, -1-y1-2*y2 < y3}, {y1 = 4-11*y2, y3 = -5+9*y2, 4/11 < y2, y2 < 2/5}, {y1 = 4-11*y2, 4/11 < y2, y2 < 2/5, -5+9*y2 < y3}, {y3 = -1-y1-2*y2, 4/11 < y2, y1 < 0, y2 < 2/5, 4-11*y2 < y1}, {4/11 < y2, y1 < 0, y2 < 2/5, 4-11*y2 < y1, -1-y1-2*y2 < y3}, {y1 = 0, y3 = -2*y2-1, 4/11 < y2, y2 < 2/5}, {y1 = 0, 4/11 < y2, y2 < 2/5, -2*y2-1 < y3}, {y2 = 2/5, y3 = -2-(3/2)*y1, y1 < -2/5}, {y2 = 2/5, y1 < -2/5, -2-(3/2)*y1 < y3}, {y1 = -2/5, y2 = 2/5, -7/5 <= y3}, {y2 = 2/5, y3 = -9/5-y1, -2/5 < y1, y1 < 0}, {y2 = 2/5, -2/5 < y1, y1 < 0, -9/5-y1 < y3}, {y1 = 0, y2 = 2/5, -9/5 <= y3}, {y3 = -1-(3/2)*y1-(5/2)*y2, 2/5 < y2, y1 < 4-11*y2, y2 < 1/2}, {2/5 < y2, y1 < 4-11*y2, y2 < 1/2, -1-(3/2)*y1-(5/2)*y2 < y3}, {y1 = 4-11*y2, y3 = 14*y2-7, 2/5 < y2, y2 < 1/2}, {y1 = 4-11*y2, 2/5 < y2, y2 < 1/2, 14*y2-7 < y3}, {y3 = -5/3-(4/3)*y1-(2/3)*y2, 2/5 < y2, y1 < -y2, y2 < 1/2, 4-11*y2 < y1}, {2/5 < y2, y1 < -y2, y2 < 1/2, 4-11*y2 < y1, -5/3-(4/3)*y1-(2/3)*y2 < y3}, {y1 = -y2, y3 = -5/3+(2/3)*y2, 2/5 < y2, y2 < 1/2}, {y1 = -y2, 2/5 < y2, y2 < 1/2, -5/3+(2/3)*y2 < y3}, {y3 = -5/3-(4/3)*y1-(2/3)*y2, 2/5 < y2, y1 < -2+4*y2, y2 < 1/2, -y2 < y1}, {2/5 < y2, y1 < -2+4*y2, y2 < 1/2, -y2 < y1, -5/3-(4/3)*y1-(2/3)*y2 < y3}, {y1 = -2+4*y2, y3 = -6*y2+1, 2/5 < y2, y2 < 1/2}, {y1 = -2+4*y2, 2/5 < y2, y2 < 1/2, -6*y2+1 < y3}, {y3 = -1-y1-2*y2, 2/5 < y2, y1 < 0, y2 < 1/2, -2+4*y2 < y1}, {2/5 < y2, y1 < 0, y2 < 1/2, -2+4*y2 < y1, -1-y1-2*y2 < y3}, {y1 = 0, y3 = -2*y2-1, 2/5 < y2, y2 < 1/2}, {y1 = 0, 2/5 < y2, y2 < 1/2, -2*y2-1 < y3}, {y2 = 1/2, y3 = -9/4-(3/2)*y1, y1 < -3/2}, {y2 = 1/2, y1 < -3/2, -9/4-(3/2)*y1 < y3}, {y1 = -3/2, y2 = 1/2, 0 <= y3}, {y2 = 1/2, y3 = -2-(4/3)*y1, -3/2 < y1, y1 < -1/2}, {y2 = 1/2, -3/2 < y1, y1 < -1/2, -2-(4/3)*y1 < y3}, {y1 = -1/2, y2 = 1/2, -4/3 <= y3}, {y2 = 1/2, y3 = -2-(4/3)*y1, -1/2 < y1, y1 < 0}, {y2 = 1/2, -1/2 < y1, y1 < 0, -2-(4/3)*y1 < y3}, {y1 = 0, y2 = 1/2, -2 <= y3}, {y3 = -1-(3/2)*y1-(5/2)*y2, 1/2 < y2, y1 < 4-11*y2}, {1/2 < y2, y1 < 4-11*y2, -1-(3/2)*y1-(5/2)*y2 < y3}, {y1 = 4-11*y2, y3 = 14*y2-7, 1/2 < y2}, {y1 = 4-11*y2, 1/2 < y2, 14*y2-7 < y3}, {y3 = -5/3-(4/3)*y1-(2/3)*y2, 1/2 < y2, y1 < -y2, 4-11*y2 < y1}, {1/2 < y2, y1 < -y2, 4-11*y2 < y1, -5/3-(4/3)*y1-(2/3)*y2 < y3}, {y1 = -y2, y3 = -5/3+(2/3)*y2, 1/2 < y2}, {y1 = -y2, 1/2 < y2, -5/3+(2/3)*y2 < y3}, {y3 = -5/3-(4/3)*y1-(2/3)*y2, 1/2 < y2, y1 < 0, -y2 < y1}, {1/2 < y2, y1 < 0, -y2 < y1, -5/3-(4/3)*y1-(2/3)*y2 < y3}, {y1 = 0, y3 = -(2/3)*y2-5/3, 1/2 < y2}, {y1 = 0, 1/2 < y2, -(2/3)*y2-5/3 < y3}

This approach works in higher dimensions too.

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