0
$\begingroup$

Two questions

1)How do you express Euler's number (≈2.718) in Maple. For example I want ln(e) to simplify to 1.

2)How do you have a constant with a subscript? For example if I wanted to input the equation $y=c_1e^x+c_2e^{-x}$ how can I best represent $c_1$ and $c_2$?

$\endgroup$

1 Answer 1

0
$\begingroup$

The base of the natural logarithm is entered as exp(1).

ln( exp(1) );

                           1

And exp(x) will raise that to exponent x.

There are two basic ways to get subscripted names in output. You can index the name in the input like c[1], or type two underscores after the base name eg. c__1.

If you are entering code in typeset 2D Math input mode (the default for new users) then in (Maple 17 or 18) as soon as you type c__ the cursor position will drop down to the subscript position. Use the right-arrow key to move the cursor right and up out of that position.

If you use the indexed name like c[1] then you cannot also assign to name c without clobbering the former. Also, some commands get confused when both are used together.

So, it's better to use the double-underscore way if you don't need the subscript to be mutable. Better to leave c[i] for the case where you need the i to change value. You mentioned subscripted constants, so likely you want the double-underscore.

Hope that helps some.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .