45 Reputation

4 Badges

10 years, 105 days

MaplePrimes Activity

These are replies submitted by shoeless



Okay. That looks better. Yes I noticed about the map method, hopefully the lesson sticks this time.

However, one point of divergence: While using the Units:-UseUnit(cal/mol) works for the attached example file, it fails when I add the solution to another document. Then when I try to apply the convert command I get: "Error, (in convert/units) unable to convert `1` to `cal/mol`" It is only interesting to note is because the document starts the EXACT SAME as what I attached earlier. Werid. I'll take a closer look on the weekend. I think maybe my brain is a bit muddled right now. 

Thanks again!


Okay, but I am a bit disappointed in how Maple is handling unit conversions. It is by no means intuitive. For example, if I do the same equation using MathCad it looks like 


This is IMMEDIATELY understandable. I am having trouble reconciling the two approaches. I am starting to wonder if it is worth the headache to move camps. I can see where the two programs complement each other, but Maple fails to easily handle units. This is fundamental. I only go off on this tirade in case someone from Maple reviews the thread. PLEASE FIX THIS. Maybe my expectations of the program are unrealistic? But why is it capable of easily solving Cp(T) with units, but it fails misserably as soon as you put it into an integral definition which then requires an additional 2-3 commands to get the desired result? All the units match i..e. there is no conversions to be done! I just don't understand.

HOWEVER, Acer thank you very for the solution :)

@Markiyan Hirnyk

 I did do a search. The solution does not work in my case. Also, my problem setup is a bit different i.e. thus the new question.

I define a function Cp:=T->equation, and then I define another function HIG:=T->equation (which uses the previous function as the integrand). Computing e.g. Cp(298[K]) will give me some number in units [cal/mol/K], as expected. However, when I use this equation as the integrand in defining a new function (also function of temperature) I cannot seem to get anywhere.



Perfect! Thank you :D

@Axel Vogt 

Ok, that does not solve the task to have it in desired form (butwhy you want that a priori?)

Just curious. The by-hand derivation that someone would typically do, in this case, does not semantically match the program's output. I was not sure if this was because I lacked key functional knowledge, or if I had unrealistic expectations. I am thinking the latter ;) However, given the responses, I now see how the results can be transformed into something that I can use and apply to real problems.



I am still trying to wrapp my head around everything in your reply, but it gets me much closer to the mark:

  • Apply integration to each part.
  • Use the convert(,trigh) command to translate the exponentials back into hyperbolic equivalents.

The double simplify is a bit counterintuitive, and there were a number of functions I have not used before i.e. it was a very nice excersise for me. Thanks! :)

@acer @Carl Love

I would give people points for the replys, but MaplePrimes is saying "you need at least 10 reputation [points] to vote items up", which is odd since I have exactly 10 :/

@Carl Love 

Okay, that makes perfect sense. Thanks again!

I can now add "unapply" to my new bag of tricks :)

@Carl Love 

Carl, thank you very much for your help. That worked. I was playing around with it yesturday making sure I somewhat understood some of the mechanics before I responded. 

Okay, so without the multiplication operators Maple thought I was tyring to use C__2 as a function (...). Makes sense now that I see it. The assuming clause! :) Very happy that it gave a "result", but whether or not it is readable by mear mortals is another matter. It would have been nice if the output was a little easier on the eyes, but I can at least verify that the two expressions are evaluating to the same results numerically.

I think I am okay on further equivalnce tests for now. There looks like there is a post that covers some identity tests here: However, I have not had time to check it out in detail, but if you had something to add I would certainly be interested for later review.

I did, however, notice one funny thing when I was playing around:

While the int() command gives me an (expanded) symbolic solution, the same command placed into a function definition will not :/ Seemed odd, e.g. HIG:=T->int(); Any idea why? It seems like Maple requires some extra commands to simplify (or expand?) the function definition symbolically. I tried to use the right-click (context) menu, but was unable to get the same result with the avaialble options.

Thanks again! Cheers



@Preben Alsholm 

Okay, thanks! That works :)

It still seems wierd though, because the documentation gives the calling sequence as

Matrix(r, c, init, ro, sym, sc, sh, st, o, dt, f, a)

So if I am understanding things, "2" is taken as r (and assumed square if c is not defined), and then "(i,j)->..." is defining a function to initialize the values to. It doesn't throw the error because each element recieves numerical results from the function as apposed to a matrix-type/object (as before)? Not super important, I am just trying to understand the procedure so I can avoid similar in the future...

This Raises Some New Questions Though...

Why do elements (1,1) and (2,2) evaluate to non-zero values in the exponent? These elements should evaluate as exp (0) = 1, but they do not. I've upload changes as I've also added units, to the worksheet to see how they work but Maple is doing something funny. It shows the Lambda definition for positions (1,2) and (2,1) as units * units (although the units clearly cancel out), and then it is omitting the units from lambda for (1,1) and (2,2) only correctly showing the denominator units. Any idea why??

Edit: my bad, please disregard additional questions. It looks like I added lambda[1,1] and lambda[2,2] definitions that overwrote the default values. Thanks again, cheers!

Page 1 of 1