## Why is my Poisson histogram not correct?...

Hello colleagues

I use Maple 2020 and I try to create Histogram of Poisson with a mean 200 [ Histogram(Sample(Poisson(200),10000))]. but I get an incorrect result in the form of a histogram as uniform distribution. But In my Maple 2015 I get a correct result.what is the problem?

## How do I solve a surface integral in Maple?...

Dear every one.

Hi.

I am trying to set up an surface integral in maple. I have been trying with the Student[VectorCalculus] package.

I have also tried to use the task template for surface integral over a disk but somehow I mess up huge time.

I have tried to find help online and in maple help center. If anyone would please take time to explain the syntax of the SurfaceInt command id be happy.

Can someone teach me how to solve this exam.

Thank you.

## How do I get an iterator for generating k-subsets ...

 The function subsets is an iterator for generating the power set of a set one set at a time.  I wanted to get iterators for all  k -subsets , so I modified the codes for getitng  iterators for the power set in the help document. with(combinat): k:=3: S := subsets({1,2,3,4,a}): while not S[finished] do    s1:=S[nextvalue]();  if nops(s1)=k then      print(s1);     end if; end do:       But I think the iterative process is done in filtering, which means that maple runs out of power sets. It may not save time. And of course we can use "choose" to get all k-subsets at once. choose({1,2,3,4,a}, 3)   So my question is is there an iterator that takes less time to get a k-subset . I prefer the iterator to the choose function because it saves memory and makes it easy to set some breakpoints in the program to terminate the process. Another interesting thing is that I looked at the source code when use print and it didn't seem to show. interface(prettyprint=2): print(combinat:-subsets)

## inverse Laplace of transfer function has hyperbol...

Hello,

I use Syrup to solve for the transfer function of a circuit, and in particular, the voltage at a given node.   If I use the "trans" option, the solution generates the expected result, in the expected format.  Syrup solves the differential equations and the resulting time domain equation is as expected.

If I then use the 'AC'  option, I get the result in the s-domain.  I then solve for the step response, and take the inverse Laplace transform.  The solution is given in terms of sinh and cosh.

If I plot the voltage in either solution as a function of time, the plots are identical.  So, the sinh/cosh solution must be somehow simplifiable so that it "looks" like the time domain solution I get from the transient analysis.

 (1)

 (2)

 (3)

Solution doing Transient Analysis

 > sol1 := dsolve(deqs):

Reassign rest to include the solution.

 > rest := eval(rest,sol1):

Compute the voltage across the capacitor Cm.

 > tmp1:=simplify(eval(v[Cm](t), sol1));
 (4)
 >
 (5)
 > solve(tmp1=2.5*(1-exp(-1)),t)
 p10 := plot(tmp1, t = 0 .. 0.00050000, color = 'blue', linestyle = 'dash')

Solution from AC analysis:

 (7)
 (8)

Impulse Response

 (9)

 (10)

Step Response

 (11)

 (12)

What is going on?  Where are the sinh and cosh terms in the solution coming from and why wont it simplify so that it looks like the other solution if they are identical?  Is there something special I need to do when using the invlaplace function?

Thanks!

## Maple worksheet stuck in "read-only" mode -- canno...

My Maple worksheet, which was working fine a few days ago, suddently cannot be modified. Many elements on the top bar (execute group, execute entire worksheet, insert maple prompt) are grayed out. Additionally I cannot edit any commands in the worksheet; clicking a command does not show any cursor and keyboard input does nothing.

Apparently I have entered some kind of read-only mode. I do not know how I did this. Meanwhile, if I start a new worksheet I can edit and execute as normal.

How do I revert my worksheet back to normal?

## solving intersection points of two function. ...

Hello!

I dont like cursing, but this had got me going.

How are there no solutions for the intersection points, i am only getting some, but not all of them, but i did ask Maple to produce an answer, but it however failed to produce all the answers. Its not that i did not try different techniques.

I really wonder what went wrong. How could this be?! Just Maple... Answers between zero and 2 Pi... plz.... (!!!)

The answers i get with the suggested method from my math book dont give any straight answer. How is that an answer, i dont want imaginary numbers, i dont want to have  Z values (what is with that anyways?)..

Well here is what i found. Also if i were to ask for solutions between x values closer together i got more answers that were not there before. That is not what i want, that is like manual labor, that is not what i want at all, i want to be faster not slower. My graphing calculator was even a faster and that did get all the answers right away..

Any way, it missed an answer between 1/2Pi and Pi, answers that were not there before when looking for values between 0 and 2Pi.

So, so odd..

It says in english: Also with finding solutions for solving goniometric equations with Maple, we should not forget that there are more solutions than just one, most of the times. We give you two methods to find all the solutions for solving goniometric equations.

 >
 > #first attempt
 >
 (1)
 > #second attempt
 >
 (2)
 > #third attempt;
 >
 (3)
 > #fourth attempt;
 >
 (4)
 >

## solve an equation by maple...

Hi

how can I find e^(-x) with respect to x in this relation

e^x (1 + sqrt(1 + e^(-2 x))) - sinh^(-1)(e^(-x))=x

## How can I display the required double spiral using...

This worksheet attempts to implement figures in Section 3 of the book "Indra's pearls" by Mumford, Series and Wright using the  command complexplot.

The worksheet seems to display Figure 3.1 on page 63 accurately but fails to correctly display Figure 3.4 on page 67.

Can complexplot be coded to accurately display this figure?

Indras_pearls_spirals.mw

## Most efficient way to compute roots of a polynomi...

Hi all,

I need to compute all roots of a polynomial equation for geometric reasons. I do want accuracy but more important is speedy calculations. I know fsolve works pretty well, but I process the polynomials on my own first. Does the roots command work better? What about solvetools. Any and all thoughts welcome.

Note I need to compute all roots.

## Almost a rational solution to a transcendental equ...

While solving an exercise in class, I ran into the following interesting solution of a transcendental equation.  It was not intentionally designed to be like this.

```restart;
eq := 2*exp(-2*t) + 4*t = 127:
fsolve(eq, t=0..infinity);
31.75000000```

The solution looks like a rational number while it was expected to be transcendental.  Let's increase the number of digits:

```Digits := 20:
fsolve(eq, t=0..infinity);
Digits := 10:
31.750000000000000000```

Let's make it even more accurate:

```Digits := 29:
fsolve(eq, t=0..infinity);
Digits := 10:
31.750000000000000000000000000
```

And even more:

```Digits := 40:
fsolve(eq, t=0..infinity);
Digits := 10:
31.74999999999999999999999999986778814353```

Is there a deep reason why the solution is so close to being a rational or is it just a coincidence?

## Could you help me find the value of P?...

I want to estimate numerically the value of P (that is the probability that f exceeds the value 12 when x, y and z are uniformly distributed within the box [-Pi, Pi]3).

```restart
f := sin(x)+7*sin(y)^2+0.1*z^4*sin(x);
Omega := [x, y, z] =~ [(-Pi..Pi)\$3]:
2        4
sin(x) + 7 sin(y)  + 0.1 z  sin(x)

h := Heaviside(f-12):
P := Int(h, Omega);
```

Here is a simple Monte Carlo estimation of P.

```f_MC  := x -> sin(x[1])+7*sin(x[2])^2+0.1*x[3]^4*sin(x[1]);
h_MC  := x -> Heaviside(f_MC(x) - 12);
omega := -Pi, Pi;

P_MC := proc(N)
local Z := Statistics:-Sample(Uniform(omega), [N, 3]):
local F := Vector(N, n -> h_MC(Z[n])):
local q := Statistics:-Quantile(Normal(0, 1), 0.005, numeric):
local e := -q*sqrt(P*(1-P)/N):
printf("A bilateral 99%% confidence interval that Prob(f > 12) is %1.3e +/- %1.2e\n", P, e);
end proc:

P_MC(10^6)
A bilateral 99% confidence interval that Prob(f > 12) is 1.643e-02 +/- 3.27e-04
```

I was hoping to get a value for P using  evalf/Int with some method.
But I didn't succeed with any of the methods for multiple integration:

• The following command returns 0 for n=1 and 2 and Int(h, Omega) if n >=3
```evalf( Int(h, Omega, 'epsilon=1e-n', 'method=_MonteCarlo') );
```

• And all my attempts with methods from the Cuba library have resulted in an unevaluated Int(h, Omega) integral.

Could you help me to estimate P using  evalf/Int ?
TIA

## Wrong result in integrating a Heaviside function...

Hi,
Can anyone tell me what's going wrong with int(Heaviside(f-1/2), x=0..1, y=0..1); ?

```restart:

f := x*y:

JH := int(Heaviside(f-1/2), x=0..1, y=0..1);  #???
1
-
4

JP := int(piecewise(x*y>1/2, 1, 0), x=0..1, y=0..1);
1   1
- - - ln(2)
2   2

# integrate "1" over the domain where f > 1/2

S := solve(f=1/2, x):
JS := int(1, x=S..1, y=1/2..1);
1   1
- - - ln(2)
2   2
```

## Numbering in set...

При использовании «объединения» нумерация не сохраняется. Непонятно, по каким алгоритмам «объединение» применяется к тому или иному месту. Почему sistema [1] не равно GRAN [1]? Как я могу это исправить?

PS Прошу прощения за грамматические ошибки, английский плохо знаю

 > рестарт;
 >
 >
 > B:=matrix([[1,        0,        1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0], [-1,        -1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0], [0,        0,        -1,        0,        -1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0], [0,        1,        0,        1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0], [0,        0,        0,        0,        1,        1,        0,        1,        0,        0,        0,        0,        0,        0,        0,        0], [0,        0,        0,        -1,        0,        -1,        -1,        0,        0,        0,        0,        0,        0,        0,        0,        0], [0,        0,        0,        0,        0,        0,        1,        0,        1,        0,        0,        0,        0,        0,        0,        0], [0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1,        0,        0,        0,        0,        0,        0], [0,        0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1,        -1,        0,        0,        0,        0], [0,        0,        0,        0,        0,        0,        0,        0,        0,        1,        1,        0,        1,        0,        0,        0], [0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        1,        0,        1,        0,        0], [0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1,        0], [0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1], [0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        1,        1] ]):
 > E:=16:V:=14;
 (1)
 > G:=2*E; êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé
 (2)
 > l:=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]:
 >
 > for i to E do De[i]:=-diff(phi[i](s[i]),s[i]\$2)=He*phi[i](s[i]):  Äó âèäà od:
 > for i to E do FSR[i]:=subs(s[i]=x,dsolve(De[i],phi[i](s[i]),output=basis)):  Îáùèå ðåøåíèÿ od:
 > for i to E do OBCHEE_RECHIE[i]:=unapply(C[i+i-1]*FSR[i][2]+C[i+i]*FSR[i][1],x): od:
 >
 > for i to E do PROIZ:=diff(OBCHEE_RECHIE[i](x),x): PROIZ_OB_RECH[i]:=unapply(PROIZ,x):od:
 >

×òåíèå ìàòðèöû èíöèäåíòíîñòè

 > i0:=1:i1:=1:z:=1:y:=1:
 > for i from 1 to V do  y:=1: z:=1:   for j from 1 to E do    if B[i,j]=1 then     x[z]:=j: z:=z+1:    fi:    if B[i,j]=-1 then     x[y]:=j:     y:=y+1:    fi:   od;   if z>=2 then    v0[i0]:=[seq(x[s],s=1..z-1)]:    i0:=i0+1:   fi:   if y>=2 then    v1[i1]:=[seq(x[s],s=1..y-1)]:    i1:=i1+1:   fi: od:
 > v0:=convert(v0,list):
 > v1:=convert(v1,list):
 >

Ïîäñ÷åò êîëè÷åñòâà ãðàíè÷íûõ óñëîâèé òèïà f(0)

 > number0:=0:
 > for i to i0-1 do if nops(v0[i])=2 then number0:=number0+2; fi: if nops(v0[i])=3 then number0:=number0+4; fi: od:
 > number0:=number0/2; #êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé òèïà f(0)
 (3)
 >

Ïîäñ÷åò êîëè÷åñòâà ãðàíè÷íûõ óñëîâèé òèïà f(1)

 > number1:=0:
 > for i to i1-1 do if nops(v1[i])=2 then number1:=number1+2; fi: if nops(v1[i])=3 then number1:=number1+4; fi: od:
 > number1:=number1/2; #êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé òèïà f(1)
 (4)
 >

Êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé ñ ïðîèçâîäíûìè

 > GP:=i0-1+i1-1;
 (5)
 >

ÍÓËÅÂÛÅ ÓÑËÎÂÈß

 > i:=1:
 > while i
 >

ÅÄÈÍÈ×ÍÛÅ ÓÑËÎÂÈß (ÈËÈ îò l)

 > i:=number0+1:
 > while i
 >

ÍÓËÅÂÛÅ ÏÐÎÈÇÂÎÄÍÛÅ

 > i:=number0+number1+1:
 > while i
 >

ÍÅÍÓËÅÂÛÅ ÏÐÎÈÇÂÎÄÍÛÅ

 > i: = число0 + число1 + nops (v0) +1:
 > в то время как i
 >
 >
 >

новогодний

 > sistema: = {}:

новенькие

 > время: = {}:
 >
 > для я от 2 до G делаю
 > sistema: = sistema union {GRAN [i]}:
 > od:
 > для я от 2 до G делаю
 > peremenie: = peremenie union {C [i]}:
 > od:
 >
 > коэфф: = решить (система, изменение):
 > коэфф:
 >
 > система [1];
 (6)
 > ГРАН [1];
 (7)
 >
 > urav: = subs (koeff, GRAN [1]):
 > uravnenie: = collect (numer (lhs (normal (urav))), {He, C [1]}):
 > uravn: = remove (has,%, C [1]):
 > uravnenie_sobs_chisla: = evalf (algsubs (He = x, uravn)):
 > ВЕСЕЛЫЕ: = неприменить (uravnenie_sobs_chisla, x):
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >

Скачать 1.mws

## Problem in implementing chain rule of partial diff...

Initially I have a system of w(x,y,t) and f(x,y,t). I have a set of two partial differential equations with this system. Later on, the system is modified into w(x,y,t,z) andf(x,y,t,z) where x and z are related due to the presence of boundary layers. Because of this, the partial differential expressions with respect to x has to change.

For example, initially: diff(w(x,y,t),x)=diff(w(x,y,t),x)
Later on, when the system gets modified in the presence of boundary layers on application of chain rule: diff(w(x,y,t,z),x)=diff(w(x,y,t,z),x)+diff(w(x,y,t,z),z)*diff(z,x)

This change has to happen for all higher order derivatives of x. In my case, I have upto 4th order derivative in x. How do I achieve these changes in the expressions in Maple in an elegant manner?

## I cannot use series function. How can I solve this...

Good day everyone. I need to calculate series of the function given above. But I can not find result. It writes "Error, (in series/function) improper op or subscript selector". How can I fix this error? Please help me.

The detailed file has been attached above.

 > Ek4:=sqrt((Ea^2*Eb^2-Eab^2*X5^2)*Ds);
 (5)
 > series(Ek4,k=0,4);
 > series(sqrt(Ek4),k=0,4);