Christopher2222

6035 Reputation

24 Badges

17 years, 144 days

MaplePrimes Activity


These are replies submitted by Christopher2222

it would be interesting also to know how many pts are in the mathematica plot.  

Could this Multi-Threading Loops thread be the related query you are referring to?

http://www.mapleprimes.com/questions/36771-MultiThreading-Loops

Unfortunately for myself the trickery involves making it work without the refresh=true option.  At the same time I'm also trying to understand the underlying lower level I/O commands. 

There is a streamcall to INTERFACE_COMPONENTSET but I don't think that will help. 

Could this Multi-Threading Loops thread be the related query you are referring to?

http://www.mapleprimes.com/questions/36771-MultiThreading-Loops

Unfortunately for myself the trickery involves making it work without the refresh=true option.  At the same time I'm also trying to understand the underlying lower level I/O commands. 

There is a streamcall to INTERFACE_COMPONENTSET but I don't think that will help. 

Originally, yes I had intended to try it from a TextArea component.  

I am hoping someone might be able to come up with some code that enters a different character for each keypress, doesn't really matter the route to get there, just hoping it's possible somehow in Maple.

Originally, yes I had intended to try it from a TextArea component.  

I am hoping someone might be able to come up with some code that enters a different character for each keypress, doesn't really matter the route to get there, just hoping it's possible somehow in Maple.

My goal was to change the entered input.

I suppose a Maplet would work better, but the idea is, as the user is typing an entry the letters are replaced by the next letter in the alphabet. 

The real concept is not so much just to shift the letters but how to make it output the next letter as one types. 
ie.  the keyed entry of ... is this interesting ... would be displayed as ... jt uijt joufsfujoh

Of course that is simply done as a whole but can it be done on a keystroke by keystroke basis?

 

My goal was to change the entered input.

I suppose a Maplet would work better, but the idea is, as the user is typing an entry the letters are replaced by the next letter in the alphabet. 

The real concept is not so much just to shift the letters but how to make it output the next letter as one types. 
ie.  the keyed entry of ... is this interesting ... would be displayed as ... jt uijt joufsfujoh

Of course that is simply done as a whole but can it be done on a keystroke by keystroke basis?

 

Hm, same question is yet again asked years later.  An answer exists there

http://www.mapleprimes.com/questions/144906-Using-RSA-Give-Your-Encryption-As-A

Hm, same question is yet again asked years later.  An answer exists there

http://www.mapleprimes.com/questions/144906-Using-RSA-Give-Your-Encryption-As-A

This should be the right solution.  It is worked out for the case of alpha=0 and answers shown in terms of an unknown load L.  Negative values indicate that member is in compression, while positive under tension.  Near the end of the worksheet I was only trying to verify that the equations matched my worked out paper version equations for alpha=0.

Setting up the force sums on each node

restart; gc()

Ax := HA+T1*cos(alpha)+T2*cos((1/4)*Pi+alpha) = 0; 1; Ay := VA+T1*sin(alpha)+T2*sin((1/4)*Pi+alpha) = 0

VA+T1*sin(alpha)+T2*sin((1/4)*Pi+alpha) = 0

(1)

(2)

Bx := -HB-T2*cos((1/4)*Pi+alpha)+T3*cos((1/4)*Pi-alpha)+T4*cos(alpha) = 0;

-T2*sin((1/4)*Pi+alpha)-T3*sin((1/4)*Pi+alpha)+T4*sin(alpha) = 0

(3)

Cx := -T1*cos(alpha)-T3*cos((1/4)*Pi-alpha)+T5*cos((1/4)*Pi+alpha)+T6*cos(alpha) = 0;

-T1*sin(alpha)+T3*cos((1/4)*Pi+alpha)+T5*sin((1/4)*Pi+alpha)+T6*sin(alpha) = 0

(4)

Dx := -T4*cos(alpha)-T5*cos((1/4)*Pi+alpha)+T7*cos((1/4)*Pi-alpha) = 0;

-T4*sin(alpha)-T5*sin((1/4)*Pi+alpha)-T7*cos((1/4)*Pi+alpha) = 0

(5)

Ex := -T6*cos(alpha)-T7*cos((1/4)*Pi-alpha) = 0;

-L-T6*sin(alpha)+T7*cos((1/4)*Pi+alpha) = 0

(6)

eq := [Ax, Ay, Bx, By, Cx, Cy, Dx, Dy, Ex, Ey]

[HA+T1*cos(alpha)+T2*cos((1/4)*Pi+alpha) = 0, VA+T1*sin(alpha)+T2*sin((1/4)*Pi+alpha) = 0, -HB-T2*cos((1/4)*Pi+alpha)+T3*cos(-(1/4)*Pi+alpha)+T4*cos(alpha) = 0, -T2*sin((1/4)*Pi+alpha)-T3*sin((1/4)*Pi+alpha)+T4*sin(alpha) = 0, -T1*cos(alpha)-T3*cos(-(1/4)*Pi+alpha)+T5*cos((1/4)*Pi+alpha)+T6*cos(alpha) = 0, -T1*sin(alpha)+T3*cos((1/4)*Pi+alpha)+T5*sin((1/4)*Pi+alpha)+T6*sin(alpha) = 0, -T4*cos(alpha)-T5*cos((1/4)*Pi+alpha)+T7*cos(-(1/4)*Pi+alpha) = 0, -T4*sin(alpha)-T5*sin((1/4)*Pi+alpha)-T7*cos((1/4)*Pi+alpha) = 0, -T6*cos(alpha)-T7*cos(-(1/4)*Pi+alpha) = 0, -L-T6*sin(alpha)+T7*cos((1/4)*Pi+alpha) = 0]

(7)

var := [HA, VA, HB, T1, T2, T3, T4, T5, T6, T7]

[HA, VA, HB, T1, T2, T3, T4, T5, T6, T7]

(8)

with(Student[LinearAlgebra]):

interface(rtablesize = 20):

sol1 := GenerateMatrix(eq, var, augmented = true)

sol1 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = cos(alpha), (1, 5) = cos((1/4)*Pi+alpha), (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = sin(alpha), (2, 5) = sin((1/4)*Pi+alpha), (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (3, 5) = -cos((1/4)*Pi+alpha), (3, 6) = cos(-(1/4)*Pi+alpha), (3, 7) = cos(alpha), (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -sin((1/4)*Pi+alpha), (4, 6) = -sin((1/4)*Pi+alpha), (4, 7) = sin(alpha), (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = -cos(alpha), (5, 5) = 0, (5, 6) = -cos(-(1/4)*Pi+alpha), (5, 7) = 0, (5, 8) = cos((1/4)*Pi+alpha), (5, 9) = cos(alpha), (5, 10) = 0, (5, 11) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -sin(alpha), (6, 5) = 0, (6, 6) = cos((1/4)*Pi+alpha), (6, 7) = 0, (6, 8) = sin((1/4)*Pi+alpha), (6, 9) = sin(alpha), (6, 10) = 0, (6, 11) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = -cos(alpha), (7, 8) = -cos((1/4)*Pi+alpha), (7, 9) = 0, (7, 10) = cos(-(1/4)*Pi+alpha), (7, 11) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = -sin(alpha), (8, 8) = -sin((1/4)*Pi+alpha), (8, 9) = 0, (8, 10) = -cos((1/4)*Pi+alpha), (8, 11) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = -cos(alpha), (9, 10) = -cos(-(1/4)*Pi+alpha), (9, 11) = 0, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = -sin(alpha), (10, 10) = cos((1/4)*Pi+alpha), (10, 11) = L})

(9)

sol2 := GenerateMatrix(subs(alpha = 0, eq), var)

sol2 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = cos(0), (1, 5) = cos((1/4)*Pi), (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = sin(0), (2, 5) = sin((1/4)*Pi), (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (3, 5) = -cos((1/4)*Pi), (3, 6) = cos(-(1/4)*Pi), (3, 7) = cos(0), (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -sin((1/4)*Pi), (4, 6) = -sin((1/4)*Pi), (4, 7) = sin(0), (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = -cos(0), (5, 5) = 0, (5, 6) = -cos(-(1/4)*Pi), (5, 7) = 0, (5, 8) = cos((1/4)*Pi), (5, 9) = cos(0), (5, 10) = 0, (5, 11) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -sin(0), (6, 5) = 0, (6, 6) = cos((1/4)*Pi), (6, 7) = 0, (6, 8) = sin((1/4)*Pi), (6, 9) = sin(0), (6, 10) = 0, (6, 11) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = -cos(0), (7, 8) = -cos((1/4)*Pi), (7, 9) = 0, (7, 10) = cos(-(1/4)*Pi), (7, 11) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = -sin(0), (8, 8) = -sin((1/4)*Pi), (8, 9) = 0, (8, 10) = -cos((1/4)*Pi), (8, 11) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = -cos(0), (9, 10) = -cos(-(1/4)*Pi), (9, 11) = 0, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = -sin(0), (10, 10) = cos((1/4)*Pi), (10, 11) = L})

(10)

sol3 := convert(sol2, radical)

sol3 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 1, (1, 5) = (1/2)*sqrt(2), (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (2, 5) = (1/2)*sqrt(2), (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (3, 5) = -(1/2)*sqrt(2), (3, 6) = (1/2)*sqrt(2), (3, 7) = 1, (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -(1/2)*sqrt(2), (4, 6) = -(1/2)*sqrt(2), (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = -1, (5, 5) = 0, (5, 6) = -(1/2)*sqrt(2), (5, 7) = 0, (5, 8) = (1/2)*sqrt(2), (5, 9) = 1, (5, 10) = 0, (5, 11) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = (1/2)*sqrt(2), (6, 7) = 0, (6, 8) = (1/2)*sqrt(2), (6, 9) = 0, (6, 10) = 0, (6, 11) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = -1, (7, 8) = -(1/2)*sqrt(2), (7, 9) = 0, (7, 10) = (1/2)*sqrt(2), (7, 11) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = 0, (8, 8) = -(1/2)*sqrt(2), (8, 9) = 0, (8, 10) = -(1/2)*sqrt(2), (8, 11) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = -1, (9, 10) = -(1/2)*sqrt(2), (9, 11) = 0, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = 0, (10, 10) = (1/2)*sqrt(2), (10, 11) = L})

(11)

sol4 := ReducedRowEchelonForm(sol3)

sol4 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 4*L, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = L, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (3, 7) = 0, (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 4*L, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = -3*L, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 1, (5, 6) = 0, (5, 7) = 0, (5, 8) = 0, (5, 9) = 0, (5, 10) = 0, (5, 11) = -L*sqrt(2), (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 1, (6, 7) = 0, (6, 8) = 0, (6, 9) = 0, (6, 10) = 0, (6, 11) = L*sqrt(2), (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = 1, (7, 8) = 0, (7, 9) = 0, (7, 10) = 0, (7, 11) = 2*L, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = 0, (8, 8) = 1, (8, 9) = 0, (8, 10) = 0, (8, 11) = -L*sqrt(2), (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = 1, (9, 10) = 0, (9, 11) = -L, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = 0, (10, 10) = 1, (10, 11) = L*sqrt(2)})

(12)

sol5 := GenerateEquations(sol4, var)

[HA = 4*L, VA = L, HB = 4*L, T1 = -3*L, T2 = -L*2^(1/2), T3 = L*2^(1/2), T4 = 2*L, T5 = -L*2^(1/2), T6 = -L, T7 = L*2^(1/2)]

(13)

for i to nops(sol5) do sol5[i] end do

T7 = L*2^(1/2)

(14)

``

 

``subs(alpha = 0, eq)

[HA+T1*cos(0)+T2*cos((1/4)*Pi) = 0, VA+T1*sin(0)+T2*sin((1/4)*Pi) = 0, -HB-T2*cos((1/4)*Pi)+T3*cos(-(1/4)*Pi)+T4*cos(0) = 0, -T2*sin((1/4)*Pi)-T3*sin((1/4)*Pi)+T4*sin(0) = 0, -T1*cos(0)-T3*cos(-(1/4)*Pi)+T5*cos((1/4)*Pi)+T6*cos(0) = 0, -T1*sin(0)+T3*cos((1/4)*Pi)+T5*sin((1/4)*Pi)+T6*sin(0) = 0, -T4*cos(0)-T5*cos((1/4)*Pi)+T7*cos(-(1/4)*Pi) = 0, -T4*sin(0)-T5*sin((1/4)*Pi)-T7*cos((1/4)*Pi) = 0, -T6*cos(0)-T7*cos(-(1/4)*Pi) = 0, -L-T6*sin(0)+T7*cos((1/4)*Pi) = 0]

(15)

simplify(%)

[HA+T1+(1/2)*T2*2^(1/2) = 0, VA+(1/2)*T2*2^(1/2) = 0, -HB-(1/2)*T2*2^(1/2)+(1/2)*T3*2^(1/2)+T4 = 0, -(1/2)*T2*2^(1/2)-(1/2)*T3*2^(1/2) = 0, -T1-(1/2)*T3*2^(1/2)+(1/2)*T5*2^(1/2)+T6 = 0, (1/2)*T3*2^(1/2)+(1/2)*T5*2^(1/2) = 0, -T4-(1/2)*T5*2^(1/2)+(1/2)*T7*2^(1/2) = 0, -(1/2)*T5*2^(1/2)-(1/2)*T7*2^(1/2) = 0, -T6-(1/2)*T7*2^(1/2) = 0, -L+(1/2)*T7*2^(1/2) = 0]

(16)

NULL

 

Download truss2.mw

 

The general case is quite messy but can easily be found, but subsituting a value for alpha gave it a cleaner look.  Also you can see what happens if alpha is set to 180 degrees that the CE member value becomes positive (under tension).  

This solution is one way to do it.  I haven't actually tried to figure out where your mistake is in your code.

This should be the right solution.  It is worked out for the case of alpha=0 and answers shown in terms of an unknown load L.  Negative values indicate that member is in compression, while positive under tension.  Near the end of the worksheet I was only trying to verify that the equations matched my worked out paper version equations for alpha=0.

Setting up the force sums on each node

restart; gc()

Ax := HA+T1*cos(alpha)+T2*cos((1/4)*Pi+alpha) = 0; 1; Ay := VA+T1*sin(alpha)+T2*sin((1/4)*Pi+alpha) = 0

VA+T1*sin(alpha)+T2*sin((1/4)*Pi+alpha) = 0

(1)

(2)

Bx := -HB-T2*cos((1/4)*Pi+alpha)+T3*cos((1/4)*Pi-alpha)+T4*cos(alpha) = 0;

-T2*sin((1/4)*Pi+alpha)-T3*sin((1/4)*Pi+alpha)+T4*sin(alpha) = 0

(3)

Cx := -T1*cos(alpha)-T3*cos((1/4)*Pi-alpha)+T5*cos((1/4)*Pi+alpha)+T6*cos(alpha) = 0;

-T1*sin(alpha)+T3*cos((1/4)*Pi+alpha)+T5*sin((1/4)*Pi+alpha)+T6*sin(alpha) = 0

(4)

Dx := -T4*cos(alpha)-T5*cos((1/4)*Pi+alpha)+T7*cos((1/4)*Pi-alpha) = 0;

-T4*sin(alpha)-T5*sin((1/4)*Pi+alpha)-T7*cos((1/4)*Pi+alpha) = 0

(5)

Ex := -T6*cos(alpha)-T7*cos((1/4)*Pi-alpha) = 0;

-L-T6*sin(alpha)+T7*cos((1/4)*Pi+alpha) = 0

(6)

eq := [Ax, Ay, Bx, By, Cx, Cy, Dx, Dy, Ex, Ey]

[HA+T1*cos(alpha)+T2*cos((1/4)*Pi+alpha) = 0, VA+T1*sin(alpha)+T2*sin((1/4)*Pi+alpha) = 0, -HB-T2*cos((1/4)*Pi+alpha)+T3*cos(-(1/4)*Pi+alpha)+T4*cos(alpha) = 0, -T2*sin((1/4)*Pi+alpha)-T3*sin((1/4)*Pi+alpha)+T4*sin(alpha) = 0, -T1*cos(alpha)-T3*cos(-(1/4)*Pi+alpha)+T5*cos((1/4)*Pi+alpha)+T6*cos(alpha) = 0, -T1*sin(alpha)+T3*cos((1/4)*Pi+alpha)+T5*sin((1/4)*Pi+alpha)+T6*sin(alpha) = 0, -T4*cos(alpha)-T5*cos((1/4)*Pi+alpha)+T7*cos(-(1/4)*Pi+alpha) = 0, -T4*sin(alpha)-T5*sin((1/4)*Pi+alpha)-T7*cos((1/4)*Pi+alpha) = 0, -T6*cos(alpha)-T7*cos(-(1/4)*Pi+alpha) = 0, -L-T6*sin(alpha)+T7*cos((1/4)*Pi+alpha) = 0]

(7)

var := [HA, VA, HB, T1, T2, T3, T4, T5, T6, T7]

[HA, VA, HB, T1, T2, T3, T4, T5, T6, T7]

(8)

with(Student[LinearAlgebra]):

interface(rtablesize = 20):

sol1 := GenerateMatrix(eq, var, augmented = true)

sol1 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = cos(alpha), (1, 5) = cos((1/4)*Pi+alpha), (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = sin(alpha), (2, 5) = sin((1/4)*Pi+alpha), (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (3, 5) = -cos((1/4)*Pi+alpha), (3, 6) = cos(-(1/4)*Pi+alpha), (3, 7) = cos(alpha), (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -sin((1/4)*Pi+alpha), (4, 6) = -sin((1/4)*Pi+alpha), (4, 7) = sin(alpha), (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = -cos(alpha), (5, 5) = 0, (5, 6) = -cos(-(1/4)*Pi+alpha), (5, 7) = 0, (5, 8) = cos((1/4)*Pi+alpha), (5, 9) = cos(alpha), (5, 10) = 0, (5, 11) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -sin(alpha), (6, 5) = 0, (6, 6) = cos((1/4)*Pi+alpha), (6, 7) = 0, (6, 8) = sin((1/4)*Pi+alpha), (6, 9) = sin(alpha), (6, 10) = 0, (6, 11) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = -cos(alpha), (7, 8) = -cos((1/4)*Pi+alpha), (7, 9) = 0, (7, 10) = cos(-(1/4)*Pi+alpha), (7, 11) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = -sin(alpha), (8, 8) = -sin((1/4)*Pi+alpha), (8, 9) = 0, (8, 10) = -cos((1/4)*Pi+alpha), (8, 11) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = -cos(alpha), (9, 10) = -cos(-(1/4)*Pi+alpha), (9, 11) = 0, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = -sin(alpha), (10, 10) = cos((1/4)*Pi+alpha), (10, 11) = L})

(9)

sol2 := GenerateMatrix(subs(alpha = 0, eq), var)

sol2 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = cos(0), (1, 5) = cos((1/4)*Pi), (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = sin(0), (2, 5) = sin((1/4)*Pi), (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (3, 5) = -cos((1/4)*Pi), (3, 6) = cos(-(1/4)*Pi), (3, 7) = cos(0), (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -sin((1/4)*Pi), (4, 6) = -sin((1/4)*Pi), (4, 7) = sin(0), (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = -cos(0), (5, 5) = 0, (5, 6) = -cos(-(1/4)*Pi), (5, 7) = 0, (5, 8) = cos((1/4)*Pi), (5, 9) = cos(0), (5, 10) = 0, (5, 11) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -sin(0), (6, 5) = 0, (6, 6) = cos((1/4)*Pi), (6, 7) = 0, (6, 8) = sin((1/4)*Pi), (6, 9) = sin(0), (6, 10) = 0, (6, 11) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = -cos(0), (7, 8) = -cos((1/4)*Pi), (7, 9) = 0, (7, 10) = cos(-(1/4)*Pi), (7, 11) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = -sin(0), (8, 8) = -sin((1/4)*Pi), (8, 9) = 0, (8, 10) = -cos((1/4)*Pi), (8, 11) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = -cos(0), (9, 10) = -cos(-(1/4)*Pi), (9, 11) = 0, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = -sin(0), (10, 10) = cos((1/4)*Pi), (10, 11) = L})

(10)

sol3 := convert(sol2, radical)

sol3 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 1, (1, 5) = (1/2)*sqrt(2), (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (2, 5) = (1/2)*sqrt(2), (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (3, 5) = -(1/2)*sqrt(2), (3, 6) = (1/2)*sqrt(2), (3, 7) = 1, (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -(1/2)*sqrt(2), (4, 6) = -(1/2)*sqrt(2), (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = -1, (5, 5) = 0, (5, 6) = -(1/2)*sqrt(2), (5, 7) = 0, (5, 8) = (1/2)*sqrt(2), (5, 9) = 1, (5, 10) = 0, (5, 11) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = (1/2)*sqrt(2), (6, 7) = 0, (6, 8) = (1/2)*sqrt(2), (6, 9) = 0, (6, 10) = 0, (6, 11) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = -1, (7, 8) = -(1/2)*sqrt(2), (7, 9) = 0, (7, 10) = (1/2)*sqrt(2), (7, 11) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = 0, (8, 8) = -(1/2)*sqrt(2), (8, 9) = 0, (8, 10) = -(1/2)*sqrt(2), (8, 11) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = -1, (9, 10) = -(1/2)*sqrt(2), (9, 11) = 0, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = 0, (10, 10) = (1/2)*sqrt(2), (10, 11) = L})

(11)

sol4 := ReducedRowEchelonForm(sol3)

sol4 := Matrix(10, 11, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 4*L, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = L, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (3, 7) = 0, (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 4*L, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (4, 11) = -3*L, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 1, (5, 6) = 0, (5, 7) = 0, (5, 8) = 0, (5, 9) = 0, (5, 10) = 0, (5, 11) = -L*sqrt(2), (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 1, (6, 7) = 0, (6, 8) = 0, (6, 9) = 0, (6, 10) = 0, (6, 11) = L*sqrt(2), (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = 1, (7, 8) = 0, (7, 9) = 0, (7, 10) = 0, (7, 11) = 2*L, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = 0, (8, 8) = 1, (8, 9) = 0, (8, 10) = 0, (8, 11) = -L*sqrt(2), (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = 1, (9, 10) = 0, (9, 11) = -L, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = 0, (10, 10) = 1, (10, 11) = L*sqrt(2)})

(12)

sol5 := GenerateEquations(sol4, var)

[HA = 4*L, VA = L, HB = 4*L, T1 = -3*L, T2 = -L*2^(1/2), T3 = L*2^(1/2), T4 = 2*L, T5 = -L*2^(1/2), T6 = -L, T7 = L*2^(1/2)]

(13)

for i to nops(sol5) do sol5[i] end do

T7 = L*2^(1/2)

(14)

``

 

``subs(alpha = 0, eq)

[HA+T1*cos(0)+T2*cos((1/4)*Pi) = 0, VA+T1*sin(0)+T2*sin((1/4)*Pi) = 0, -HB-T2*cos((1/4)*Pi)+T3*cos(-(1/4)*Pi)+T4*cos(0) = 0, -T2*sin((1/4)*Pi)-T3*sin((1/4)*Pi)+T4*sin(0) = 0, -T1*cos(0)-T3*cos(-(1/4)*Pi)+T5*cos((1/4)*Pi)+T6*cos(0) = 0, -T1*sin(0)+T3*cos((1/4)*Pi)+T5*sin((1/4)*Pi)+T6*sin(0) = 0, -T4*cos(0)-T5*cos((1/4)*Pi)+T7*cos(-(1/4)*Pi) = 0, -T4*sin(0)-T5*sin((1/4)*Pi)-T7*cos((1/4)*Pi) = 0, -T6*cos(0)-T7*cos(-(1/4)*Pi) = 0, -L-T6*sin(0)+T7*cos((1/4)*Pi) = 0]

(15)

simplify(%)

[HA+T1+(1/2)*T2*2^(1/2) = 0, VA+(1/2)*T2*2^(1/2) = 0, -HB-(1/2)*T2*2^(1/2)+(1/2)*T3*2^(1/2)+T4 = 0, -(1/2)*T2*2^(1/2)-(1/2)*T3*2^(1/2) = 0, -T1-(1/2)*T3*2^(1/2)+(1/2)*T5*2^(1/2)+T6 = 0, (1/2)*T3*2^(1/2)+(1/2)*T5*2^(1/2) = 0, -T4-(1/2)*T5*2^(1/2)+(1/2)*T7*2^(1/2) = 0, -(1/2)*T5*2^(1/2)-(1/2)*T7*2^(1/2) = 0, -T6-(1/2)*T7*2^(1/2) = 0, -L+(1/2)*T7*2^(1/2) = 0]

(16)

NULL

 

Download truss2.mw

 

The general case is quite messy but can easily be found, but subsituting a value for alpha gave it a cleaner look.  Also you can see what happens if alpha is set to 180 degrees that the CE member value becomes positive (under tension).  

This solution is one way to do it.  I haven't actually tried to figure out where your mistake is in your code.

So how can we get Maple to output a radical in the denominator.  Does Carl's proc fix it?  I'm not using uprotect so I won't run it. 

Basically if a solution outputs an answer with sqrts, I'd like a proc that will force all of the sqrt(#)/# back to 1/sqrt(#)

Similarily x/2^(1/6) , gets turned it into   x * ( 2^(5/6) ) / 2   .   Why can't the radical just stay in the denominator?  It makes no difference to the computer wether it's in the numerator or denominator, I'd like to see it in the denominator. 

As a side note distraction, but not to detract from what we're trying to achieve here in Maple, Mathematica will keep the output of 1/(2^(1/2)). 

 

So how can we get Maple to output a radical in the denominator.  Does Carl's proc fix it?  I'm not using uprotect so I won't run it. 

Basically if a solution outputs an answer with sqrts, I'd like a proc that will force all of the sqrt(#)/# back to 1/sqrt(#)

Similarily x/2^(1/6) , gets turned it into   x * ( 2^(5/6) ) / 2   .   Why can't the radical just stay in the denominator?  It makes no difference to the computer wether it's in the numerator or denominator, I'd like to see it in the denominator. 

As a side note distraction, but not to detract from what we're trying to achieve here in Maple, Mathematica will keep the output of 1/(2^(1/2)). 

 

So what about a procedure that can do it?

First 83 84 85 86 87 88 89 Last Page 85 of 162