## 160 Reputation

8 years, 294 days

## MaplePrimes Activity

### These are replies submitted by max125

Why does 'multiplying both sides by the denominator' make rsolve work?

Also I am curious about what the effect of appending "makeproc" does.

I tried to replicate the action using a function.

Without makeproc:

```restart: SP:=n->rsolve({S(n)-S(n-1) = 2*S(n)^2/(2*S(n)-1), S(1)=1}, {S(n)}): SP(10); >Error, (in rsolve/single) argument 10 in function S(10) is not a name```

With makeproc, it works, but then SP(n) doesnt work.

```restart: SP:=rsolve({S(n)-S(n-1) = 2*S(n)^2/(2*S(n)-1), S(1)=1}, {S(n)},makeproc): SP(10); >1/19```

```SP(n); >Error, (in SP) input must be an integer```

Why doesn't SP(n) work?

I simplified S(n)-S(n-1))*(2*S(n)-1)=2*S(n)^2 and solved for S(n).

but strangely

`restart: A:=rsolve({S(n)= S(n-1)/(1+2*S(n-1)),S(1)=1}, {S(n)});`

`restart: A:=rsolve({S(n)*(1+2*S(n-1)) = S(n-1),S(1)=1}, {S(n)});`

This appears to be the multiplying by denominator approach.

Thanks guys, very clever solution.

## These are great suggestions. ...

These are great suggestions.

## Nice work!...

Useful program.
I would love to learn how to make applets like this for statistical hypothesis testing.

## Did you use them in previous calculation...

It may be that r_i and theta_j were previously defined.

Check r_i or r__i and theta__j  , seperately on a new line.

## I guess i will have to double check my r...

Setting Digits:=20 is sufficient hopefully.

## Update, it seems that Maple 2018 may or...

Maple int(int(int ( ) ) ) versus int( ) . The latter evaluates the outermost bounds, the former does not.

@Kitonum Thanks.

I was able to integrate it with cylindrical and spherical

## Thanks, i changed the code...

@Fabio92 I changed the code so we don't evaluate a non-integer subscript. How is this?

medianmean:= proc(x) local a,b,c,d,g;
a:=sort(x);
b:=nops(x);
c:=nops(x)/2;
d:=(nops(x)+1)/2;
if (b mod 2 = 0) then
evalf([a,(a[c]+a[c+1])/2,g]) ;
else
evalf([a,a[d],g]);
end if;
end proc:

Alternatively i can put the m inside the 'if then' body.

medianmean:= proc(x) local a,b,c,d,g,m;
a:=sort(x);
b:=nops(x);
c:=nops(x)/2;
d:=(nops(x)+1)/2;
if (b mod 2 = 0) then
m:=  (a[c]+a[c+1])/2;
evalf([a,m,g]) ;
else
evalf([a,a[d],g]);
end if;
end proc:

## Thanks for the reply. C...

Thanks for the reply. So by setting y(x) = y in your subs statement, that tells maple to treat y(x) like a regular variable.

Question. When you say ' the explicit dependence of  y(x)  is unknown ' you mean maple doesn't know in what way y depends on x. For example y(x) could equal to x^2

Your help is very much appreciated.

Hi. I am a little confused by your command. I would never have thought of using it.

soln:= {solve({seq(gr)}, {V[]})};

Interesting i never used [ ] after an expression. It looks like V[ ]  returns just the arguments of the list V.

seq(eval([H,HD], s), s in soln)

I'm not sure how the s works here, since there is no s in H or HD.

## That worked! Thanks....

@vv The fsolve did the trick, and the ceil adds a nice touch.

Maple just hangs if i enter

solve(1/(n+1)!* exp(0.1)=0.00001)

I think I see why, if we enter a smaller decimal. Maybe there is an option to assume it is an integer.

solve(1/(n+1)!=0.001)
16.02145932 + 36.80027439 I, 17.40551912 + 41.39124994 I,

16.48933165 + 38.34437280 I, 16.95055079 + 39.87440201 I,

18.29811880 + 44.38849109 I, 17.85459913 + 42.89570920 I,

18.73637598 + 45.87023709 I, 19.16964217 + 47.34152827 I,

19.59816570 + 48.80289315 I, 20.02217437 + 50.25481425 I,

20.85746941 + 53.13205768 I, 20.44187781 + 51.69773365 I,

21.26912810 + 54.55816094 I, 17.40551912 - 41.39124994 I,

16.02145932 - 36.80027439 I, 16.95055079 - 39.87440201 I,

16.48933165 - 38.34437280 I, 18.29811880 - 44.38849109 I,

17.85459913 - 42.89570920 I, 19.16964217 - 47.34152827 I,

-1.999000576, 5.174176717, 33.68275763 + 99.71946905 I

## Question...

Is it possible to translate your worksheets into English. They look very useful.

## Thanks!...

@acer Thanks! I will try that.

## Thanks...

@rlopez Thanks for replying. Interesting fact about the variation of parameters and integrals.

 1 2 3 4 5 Page 2 of 5
﻿