## 45 Reputation

13 years, 331 days

## Integration with Units Error...

Maple

This is my first attempt at trying the units feature within Maple. I have had mixed results. I have a function defined that gives me values in [cal/mol/K], which is correct. But when I try to use this as the integrand in an integral definition it does not want to solve. I cannot determine what the problem is.

I thought that I possibly needed to define units in the integral expression, but this just produces more errors or locks-up Maple completely. (Side note: When Maple locks-up, the "interupt current operation" toolbar often does not correctly kill the operation, and I am forced to restart Maple :/)

As I have the problem defined, I should get the following result:

T__sys= 64.47487 [K], should get me HIG(T__sys) = -19682.7 [cal/mol].

See attached: EnthalpyTrace_-_Integrating_with_Units_Error.mw

Any help or insights would be greatly appreciated.

## Symbolic Integration...

Maple 2015

Just trying Maple again after 10+ years, so please bear with me. I am basically trying to do a symbolic integration, where the output should be the antiderivative of the function I am integrating. However, I have not been able to succesfully get the output I expect.

I defined a function Cp(T), with constants C1, C2, etc. like so:

C__p := T -> C__1+C__2(C__3/(T*sinh(C__3/T)))^2+C__4(C__5/(T*cosh(C__5/T)))^2

But when I integrate the function using int(Cp(T), T=Tref..Tsys) it does not output the antiderivative as I would expect. This is what I am looking for, but it just gives me the equation within the integral sign without symbolically solving integral. Can this be done?

It should be,

int(Cp(T), T=Tref..Tsys) = C1*(T2-T1) + C2*C3[coth(C3/T2) - coth(C3/T1)] - C4*C5[tanh(C5/T2)-tanh(C5/T1)]

Trivial integrals such as int(x2,x) = 2x solve okay, so I am assuming I setup the problem incorrectly. I just cannot figure out what I did wrong, and it is driving me crazy. I already wasted more time than is healthy on this. Any help would be greatly appreciated. Thanks.

## How to Correctly Define Elements of a Ma...

Maple 18 MaplePrimes

I'm used to Mathcad, and I am very new to Maple. Something I cannot figure out right now is how to define multiple elments of a matrix using a function.

Input Data

Define system dimensions as n:=2;

i:=1..n;

j:=1..n;

lambda:=Matrix(n);

Lambda:=Matrix(n);

upsilon:=vector(n);

Minor side note: I originaly had upsilon defined using the syntax "Vector[row](ncomp)", but this was giving me an 'exponentiation' operation error, so I changed it to what it is now (basically a list/array, which I guess has different type definitions that no longer cause the error?).

lambda[1,2]:=471.0433;

lambda[2,1]:=883.7530;

upsilon:=58.69;

upsilon:=18.07;

The Problem I'm Having

Now I just want to define Lambda using a function to define all elements (like I would in Mathcad).

Lambda[i,j]:= (upsilon[j]/upsilon[i]) * exp (-lambda[i,j]/2853);

which gives me an extremely long error message:

Error, invalid input: exp expects its 1st argument, x, to be of type algebraic, but received Matrix(2, 2, {(1, 1) = -0.3504976272e-3, (1, 2) = -.16509955895845776, (2, 1) = -.30975332953088164, (2, 2) = -0.3504976272e-3}, datatype = float

As far as I can tell (keep in mind that this is my very first Maple project) that it doesn't like lambda as a matrix? But shouldn't it just evaluate to the element? and why is (2,2) and (1,1) giving values, because it should intialize to zero, so exp(0) = 1 in these cases??

I tried to simplify further by just trying

Lambda[i,j]:=(upsilon[j]/upsilon[i]);

but then it just gives me 1, and when I look into Lambda all the elements are now 1 when only the diagnol elements should be 1 (the rest some fractional amount)??

I am at a complete loss. I thought about doing something like For i = 1 to n etc. but then it just looks like coding, which defeats the purpose of trying to make a calculation sheet documenting the procedure...

Any help and/or insights into what I am doing wrong here would be most welcomed :)

P.S. I've just noticed that there is an upload option :/ Wilson_Equation.mw.

 Page 1 of 1
﻿