Carl Love

Carl Love

18378 Reputation

24 Badges

7 years, 301 days
Mt Laurel, New Jersey, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@ReactionUra Which are the 13 variables? Using Maple 2020, I solved it almost immediately, but I let it pick the variables to solve for. I can't investigate further without knowing the variables.

Also note that there are two instances of exp^(...that need to be corrected.

I can't tell what's going on without seeing how you've used Units in the preceding code. But this should give you the correct result:

max~(0, ResLoadcombination_unitfree)

Does that work for you?

Please Post this as a Reply to your earlier Question.

If you're trying to find a value of L such that y(2) = 0, it's done already. That value is L = 2.717402017. There's no need to use bisection as a root-finding method; fsolve takes care of that.

If you're going to download the OP's worksheet, make sure to turn off autosave first. If you don't, the first autosave will never finish, and you'll be forced to kill your entire Maple session. To turn off autosave, go to Tools => Options => General, uncheck the last item, and Apply to Session.

@janhardo Okay, I see my mistake of a lack of generality. Your solution can be obtained from pdsolve by

pdsolve(diff(u(x,y), x, y) = -diff(u(x,y), x));
             u(x, y) = _F1(y) + exp(-y)*_F2(x)

 

@janhardo What long calculation? I get the solution _C1*x*exp(-y) + _C2.

@acer Acer, would you please explain the purpose of

a:= 'a':  b:= 'b':  c:= 'c':

that appears before the gc() that appears before timed code? My guess is that its purpose is to force garbage collection of %%%, and %%%.

Also, I'm guessing from the way that you recoded ZigZag that compiled procedures can't use op(procname). I used that to avoid the extra procedure layer (i,j)-> ZigZag(i,j,n).

@Rouben Rostamian  Thanks. When you edit a Reply, there's a pull-down at the bottom that says Parent. That's how you move Replies to different Answers. 

@Rouben Rostamian  Here is the inverse of the above procedure, i.e., it returns the indices given the entry:

ZigZagInv:= (k::posint)-> 
local n:= op(procname);
    if k > n*(n+1)/2 then n+1 -~ thisproc(n^2+1-k)
    else
        local d:= ceil((sqrt(1+8*k)-1)/2), r:= k - (d-1)*d/2;
        [r, d+1-r][(-1)^d*[1,2]]
    fi
:
#Example usage
M:= Matrix(8$2):
for k to 64 do M[ZigZagInv[8](k)[]]:= k od:
M;

 

@acer The design that units are names rather than strings (or records or objects) seems to me to be inherently flawed.

@Sayed From my code above, the set of coefficients alone is simply {C}.

@Carl Love In other words, diff acts as if the part of it that handles unevaluated functions as the first argument were coded like this:

restart:
old_diff:= eval(diff):
unprotect(diff);
diff:= overload([
    proc(f::function, x::name, $)
    option overload;
    local F:= op(0,f), d:= cat(`diff/`, `if`(F::indexed, op(0,F), F)), r;
        r:= `if`(F::indexed, d[op(F)], d)(op(f), x);
        `if`(r::specfunc(d), 'procname'(args),  r)        
    end proc,

    old_diff
]):
protect(diff, old_diff);    
        

As far as I can telll, the part about passing the index isn't documented, and VV must've made an educated guess that it would work.

@janhardo 

Do

showstat(Drawlines);

and post the results here. I'll probably be able to tell you how it works and to fix it.

The Google Drive links that you posted to this code require a password, so I wasn't able to download it.

@mmcdara It must be the case that diff passes f's index as the index to `diff/f`.

@janhardo Can you show examples of Drawlines or Drawplanes not working?

2 3 4 5 6 7 8 Last Page 4 of 533