Simwar

80 Reputation

4 Badges

7 years, 300 days

MaplePrimes Activity


These are replies submitted by Simwar

@Carl Love I learned a lot from this!
One last thing;
I can't seem to make the parameter declaration work in the first paranthesis, unless I use the Code Edit Region.
It works if I move the satisfies(n->n>=x) to after the local variables, which looks weird.

Why is this and can I avoid it?

proc_improvements.mw

@Carl Love 
Thank  you, that was very educational!
It feels impossible to look up stuff like this when you're mostly self taught, so this is much appreciatet :)

I tried copying your improvements, but I seem to have a problem with the 'relation' in the end.
proc_improvements.mw

A few questions:
1) How exactly is double colon suposed to be understood? Not sure when it is used instead of definitions.
2) I don't quite understand how the satisfies command works and I couldn't find information regarding it. Is it similar to satisfy or satisfiable? Why is "n->" needed?
6) Why are the forward quotes needed here on list, integer and range?
8) Is it gonna show both the roll and the counter now? Are they both return values or how do I choose which one it is?

Thanks both of you. That was very helpful :)

It works fine if I do like this. So what's wrong with the first try using two sums?
 


 

``

x := 2; y := 2; A := [seq(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = i .. x), i = 1 .. 3)]
NULL

[5/9, 1/9, 0]

(1)

sum(binomial(y, i)*(1/3)^i*(2/3)^(y-i)*A[i+1], i = 0 .. y)

8/27

(2)

``


 

Download Sum_fejl1.mw

@John Fredsted 
Thank you, it works.
Can I do something using this method to create more space between the displayed matrices?

@acer 
Thanks. Tried doing it, but I get this:
[{u = (1/4)*(4*sin((2/9)*Pi)*3^(1/2)+8*cos((2/9)*Pi)+5)*(I*csgn((-(6*I)*3^(1/2)-6)*sin((2/9)*Pi)+(6*I-6*3^(1/2))*cos((2/9)*Pi)-(12*I)*cos((4/9)*Pi)+4*I+12*sin((4/9)*Pi))*(2*(19-12*sin((2/9)*Pi)*3^(1/2)-6*cos((2/9)*Pi)-6*cos((4/9)*Pi))^(1/2)+2-3*sin((2/9)*Pi)*3^(1/2)+3*cos((2/9)*Pi)-6*cos((4/9)*Pi))^(1/2)+(2*(19-12*sin((2/9)*Pi)*3^(1/2)-6*cos((2/9)*Pi)-6*cos((4/9)*Pi))^(1/2)-2+3*sin((2/9)*Pi)*3^(1/2)-3*cos((2/9)*Pi)+6*cos((4/9)*Pi))^(1/2)), v = (1/4)*(2*(19-12*sin((2/9)*Pi)*3^(1/2)-6*cos((2/9)*Pi)-6*cos((4/9)*Pi))^(1/2)-2+3*sin((2/9)*Pi)*3^(1/2)-3*cos((2/9)*Pi)+6*cos((4/9)*Pi))^(1/2)+((1/4)*I)*csgn((-(6*I)*3^(1/2)-6)*sin((2/9)*Pi)+(6*I-6*3^(1/2))*cos((2/9)*Pi)-(12*I)*cos((4/9)*Pi)+4*I+12*sin((4/9)*Pi))*(2*(19-12*sin((2/9)*Pi)*3^(1/2)-6*cos((2/9)*Pi)-6*cos((4/9)*Pi))^(1/2)+2-3*sin((2/9)*Pi)*3^(1/2)+3*cos((2/9)*Pi)-6*cos((4/9)*Pi))^(1/2)}]
 

Download solve.mwsolve.mw

@vv 
Corrected the 2nd formular and ran your code for 10,000 repititions, getting 0 fails.
Can I just rest assure that they are equal then?

Great, thanks. I'll try using that again once I've attempted to sort out the mistakes.
But is there no way to test it other than simulating it a lot of times and hope a possible mistake gets caught?

Found a mistake in the formulas myself.
But my main question is, can I make maple tell me wether or not they are equal, when setting the parameters within some certain intervals?

@Markiyan Hirnyk My bad, didn't notice I could simply attach the maple file.
Does this work?
Download sample.mwsample.mw

@Markiyan Hirnyk 
I've sampled a lot of different values for the parameters, and for all values so far the two formulas has given the same result.
I'd like to proove wether or not the two formulas are in fact equal.

Page 1 of 1