tomleslie

13876 Reputation

20 Badges

15 years, 164 days

MaplePrimes Activity


These are replies submitted by tomleslie

@rit 

restart;
moves:=[]:
hanoi:=proc(N,source,dest,aux)
 global moves;
  if N>0 then
     hanoi(N-1,source,aux,dest):
     moves:=[moves[],[N,source,dest]]:
     hanoi(N-1,aux,dest,source);
  end if:
end proc:
hanoi(7,1,2,3);
moves;

Your equations are inconsistent. Consider

CF1:=EIθo=0

CF2:=EIYo=0

and

CF3:=EIYo+4*EIθo+1.60000000 105

the last of which Maple/solve()  will "interpret" as

CF3:=EIYo+4*EIθo+1.60000000 105=0

**********************************************
Not sure what Carl means by remove the assume command - possibly  a typo for asssign?? Anyway, another way to see the inconstency/insolubility of your system is to perform an elimination process step by step, as in

eqns:=subs([CF1,CF2], [ CF3, CF4, SumFY, sumMA]);

which will return the new set of "equations"

eqns:=[160000.0000, 610931.2500+7.145833333*FCy, FAy+FCy+FEy-81000.00000, sumMA]

which means that sumMA is undecidable (although again I think Maple/solve would interpret this as sumMA=0). If one tries to solve the "meaningful" expressions in eqns (ie the second and third) using

solve( eqns[3..4], {FCy, FAy, FEy});

then Maple will, correctly, return

{FAy = 166494.7522-1.*FEy, FCy = -85494.75219, FEy = FEy}

so FCy, can be determined, but FAy and FEy cannot, except in terms of each other.

The question is so badly expressed that any solution attempt is guesswork:

For example if

mm := [[a, 1], [a, b]];

then when you say

if mm[ij][1] = 1 or mm[ij][2] = 1 or mm[ij][3] = 1

there is no mm[ij][3]. Any call, mm[ij] will return a 2-element list, so asking for the third element by using mm[ij][3] is simply meaningless

Taking a random guess at what you might want, does

mm := [[a, 1], [a, b]];
mm2seq:= { seq( `if`( member(1, mm[ij]), NULL, mm[ij]), ij=1..2) };

provide it? If not, you need to rephrase the question

 

  1. No responders on this site are going to retype your code in order to diagnos youre problem. Therefore you should take the advice which you were given in a preious post. UPLOAD A WORKSHEET WHICH CLEARLY DEMONSTRATES YOUR SPECIFIC PROBLEM.
  2. The Mapleprimes interface provides this functionality with a BIG GREEN UPARROW ta the right hand end of the second row of toolbar icons
  3. If you manage to upload a worksheet which clearly demonstrates your specific problem, then I may think about - otherwise, no chance

 

@Carl Love 

My thought ptocess was a little like yours: I assumed all parameters to be real and positive - my reasoning, well just for the hell of it. I thought such assumptions might offer some enlightenment. Somewhat strangely if I make these assumptions and set the lower integral limit to be zero, Maple still returns unevaluated

restart;
assume(snr > 0);
assume(B > 0);
assume(sigma > 0);
assume(eta > 0);
assume(y > 0);
assume(A[o] > 0);
expr:=exp(-(ln(z/(snr*B^2))+4*sigma^2)^2/(32*sigma^2))*eta^2*(y/z)^((1/2)*eta^2-1)/(z*sqrt(32*Pi*sigma^2)*(2*sqrt(y*z))*(2*A[o]^(eta^2)));
int(expr, z = 0 .. infinity);

What exactlry did you dom, tp get an evaluation???

The worksheet contains a few constructs which I do not understand. So my ability to respond is limited

The problem seems to arise with the use of the &under construct whose function I cannot figure out either from the original post or the Maple help. On the other hand, the apparently desired result *seems* to be achievable without using this construct - puzzling: but see attached.

CLtypes.mw

@acer 

Nowhere in my "professional use, retail" versions of Maple18 or Maple 2015 are there pdf versions of the Programming Guide or the User Manual - although as you state, they are avaiable from the Maple documentation centre

As in,

M := Matrix( [ [ 1/7*(5*exp(-3*t)+2*exp(4*t))*exp(-t),
                        2/7*(exp(-3*t)-exp(4*t))*exp(-t)
                     ],
                     [ 5/7*(exp(-3*t)-exp(4*t))*exp(-t),
                       1/7*(2*exp(-3*t)+5*exp(4*t))*exp(-t)
                     ]
                  ]
                );
(combine@expand)~(M);

The numbers in my original response were obtained using Maple 18 (don't ask!!)

Running the codes in Maple2015 I get ~10secs for your original, and ~1sec for my revised version - so only a 10X speed-up

However my original comment applies: ie given that the answers can be obtained in ~1sec in Maple2015 - how much faster were you hoping for?? My roiginal comment about gaining another factor of 2, would take it to 0.5secs!!!

I'd have to be doing this calculation a lot of times before I worried about the difference betwee 1sec and 0.5 sec

I've just checked this in Maple 18 and it works as nm has already posted

I think you are going to have to upload (big green arrow in the Mapleprimes toolbar) an example of

CharacteristicPolynomial(M,x)

doing something incorrect

@Carl Love 

"applying modular arithmetic to decimal numbers" is OK provided those decimal numbers are integers/rationals - OP's are floating point, for which mod is undefined.

I also have no idea what would be the objective of applying mod to an  "inert" function is!!

@Axel Vogt 

When this problem was originally posted my first step wast to try to simplify the function in The OP's original response - hence my original comment.

And Axel's comment essentialy reflects mine (see attached)

However I was also struck by Preben's original comment which showed a result varying depending on whether one labelled the expression to be transformed as U(x) or U: note that in this context U(x) is not a function - it is an expression label - why should this make a difference???

See attached

invLap2.mw

Executing simplify() on your expression, the first term turns out to be identically zero - do you expect that? Maple still returns the invlaplace() of the second term unevaluated, but before I think any further, I'd like confirmation that the starting expression is correct. See attached

invLap.mw

 

@Al86 don't really remember, but I suspect it was something like


 "numerical solution of 2D integral equations"

@Al86 

The Maple command intsolve() solves several different types of Fredholm and Volterra integral equations, although only in one dimension. My original thought was that I could use this command to solve your equation for x=1, (where it reduces to an inhomogeneous Volterra equation) and then figure out how to solve the 2-D problem. However, with x=1, and despite playing many tricks, I have been unable to persuade intsolve() to generate a solution for the resulting 1-D system.

This tells me that solving your 2-D Volterra system is going to be very difficult. I did a bit of casual browsing on methods of solving 2-D inhomogeneous Volterra equations and there are lots of algorithms out there - which tells me that no one algorithm is guaranteed!! At the same time each of these algorithms is moderately complicated, so whilst it could be coded in Maple (or any other language you want) this is a seriously non-trivial task, and you might have to code several of these algorithms before finding one which will produce a solution.

I simply don't have the time/energy (or possibly even expertise!!) to code such algorithms and try them - sorry

I would be interested to know if any other Math package (Matlab/Mathematica) offers more hope - but somehow I doubt it

First 185 186 187 188 189 190 191 Last Page 187 of 207