As for me, it works fine, though I can be improved in a number of ways.

Hi,
Maybe you should try something like that:
```
restart;
> with(Statistics):
> X:=RandomVariable(Uniform(-Pi, Pi));
>
> assume(And(G>0, G<1)); #G=Gt*Gr
> abs(1-G*exp(-I*X));
> about(G);
> abs(1-G*exp(-I*x)) assuming(x::real);
> F:=unapply(%,x);
> Mean(F(X));
> int(F(x)/2/Pi,x=-Pi..Pi): simplify(%);
```

I hope this yields the desired solution.

```
V:=x->piecewise(x=0, a, infinity);
V(x);
V(1);
V(-1);
V(0);
```

You meant that, didn't you?

Hi there,
I dont understand your wish to the greatest detail but I think you should see the ?piecewise page

As you probably already noticed, x is a random variable *Bernoulli(p)*-distributed; by means of the transformation x->2*x-1 on '*Sample(x,1)[1]*' we get a number which is 1 with probability p and -1 with probability (1-p)-this random part of the procedure decides whether the proces goes up- or downwards; *inde* is in {-1,1}. S[i] is the process position at time 'i' - its value the process position at the moment immediately before time i increased (or decreased) by value +iv (or -dv) depending on the variable inde - the if statement assigns the right direction: if inde = 1 then the process goes up by *iv*, otherwise it goes down by *dv*. That's it.
Sure, you can incorporate another possibility offhand; this reqiures only slight changes.
Have a nice day

This proc should work, I hope.
```
randomwalk:=proc(sv,iv, dv, n, p,a::rational)
uses Statistics;
local x, inde, S, i, points;
description "rand walk with increase 'iv' and increase probability 'p', decrease 'dv' and 'n' periods of observation and 'a' being step";
x:=RandomVariable(Bernoulli(p)):
S[0]:=sv;
for i from a by a to n do
inde:=2*Sample(x,1)[1]-1:
S[i]:= S[i-a]+`if`(inde=1, inde*iv, inde*dv);
od;
i:='i':
points:=[seq([a*i, S[i*a]], i=0..n/a)];
plots[pointplot](points, color=blue, connect=true);
end proc;
```

The walk starts at value sv at time 0, increases iv units or decreases dv units after 'a' units of time, the 'going up' probability is 'p'.
Of course, there can be as many variations of it as Maple's users.
I hope this helps

When your trying to solve the ODE, Maple returns:
```
(diff(V(t),t))^n*(V(t)+Vp)+(diff(V(t),t))^(n+B)*(V(t)*A1+Vp*A2)=C;
dsolve(%,V(t));
```

Incorporating the boundary condition allows to determine the _C1 constant (which is 0) but it will be extremally difficult (if not impossible) to determine the RootOf() being integrated. In general, this type of equations do not have 'compact' solutions, but it might be a good idea to try graphics -> in this case you need to assign values to A2,Vp,A1, n, B, C

But your right, adding scaling sheds a little light on the figure's shape:-)
and of course, filled=true does the rest, no need for 'seq', which is time-consuming,
Thanx anyway....

Hi,
as I understood, your trying to solve the reccurance relation, backwards relation. I tried only the "rsolve" command, but it fails. The 'direction' of the reccurance, however, is not a problem, one can simply overcome it, but still Maple's rsolve is not helping:-(
mfg

Please see the sol_comlex_inequ file....
I cannot (am I dumb??) insert any of my codes into the post!!!
Maybe someone will teach me, one day:-)

Try "implicitplot", and that's it, hopefully:
```
with(plots):
implicitplot(V=1.186*10^3*exp(-9.478*10^(-3)*V)
+749.579*0.455*exp(-t/0.245)+0.0375*exp(1/(4*t+1.2)), t=0..10, V=0..3000);
```

Hi,
Try this:
A:=Matrix(2,[[r1*X, (1-r1)*X],[1-r2,r2]]);
collect(A^3, X);
I hope thats what you have been looking for.
MfG