-1

I'm learning how to use Mathcad and its symbolic engine, and it's pretty good. But I've encountered a major drawback, while working with units.

ln(2)=0.693, performing the natural logarithm on the integer 2 returns the expected result.

ln(2*s)= throws an error: These units are not compatible where s is labeled as a unit, referring to seconds.

Expected result: ln(2*s)=0.693*s

Simply adding the variables units later is not an option, as the ln function can appear as a result of previous symbolic calculations. Any ideas on how to get it working?

Mathcad Prime 7.0.0.0

  • I’m voting to close this question because math and mathcad questions should be asked on the math SE. – Rob Apr 02 '22 at 10:37

1 Answers1

1

I can suggest this way: you can just redefine standard log-function like that

enter image description here

But please, be careful with what you expect from unit defined log-functions.

  • I see what you mean, units can be tricky, especially after a couple symbolic integrals. I might actually need to strip the units from the `ln` argument instead. Also, I added a conditional to check the presence of the unit, so I got it working with symbolics as well, and took the same approach with `exp` function. This got me on track to make adjustments as needed. Much appreciated!!! – Richard Nicolaas Mejerink Apr 02 '22 at 15:59