## 2228 Reputation

17 years, 169 days

## Sequence of maps...

Consider the following:
```> [seq](x -> i*x,i = 1..3);
[x -> i x, x -> i x, x -> i x]
```
Why does it not produce output identical to the following?
```> [x -> x,x -> 2*x,x -> 3*x];
[x -> x, x -> 2 x, x -> 3 x]
```

## Regions bounded by lines...

Maple
Inspired by the blog post Find a point in every region defined by a system of linear equations, I have come up with the following method to find a point inside each bounded region. The assumptions are:
• No two lines are parallel.
• No three lines are coincident.
Due to numerical instability, it seems, using floats, the coefficients of the equations of the lines are taken to be integers (they could also have been taken to be fractions, of course). Then the method goes like follows:

## Maple Expressions to LaTeX converter...

Maple

I have written a module based Maple expressions to LaTeX converter which can handle the following nested (as given by `ToInert`) inert types:

_Inert_RATIONAL, _Inert_COMPLEX, _Inert_NAME, _Inert_SUM, _Inert_PROD, _Inert_POWER, _Inert_SET, _Inert_LIST, _Inert_FUNCTION, _Inert_MATRIX, _Inert_VECTOR_COLUMN, _Inert_VECTOR_ROW, _Inert_TABLEREF.

As a somewhat cruel test example consider

```expr := Matrix(2,2,(i,j) ->
-(-x)^(-i/2+c)*sin(x)^(-j)*(a+I*b)^((i-j)/2)
+f({-i,j})/g([-i,j])
+m[i,j]
);
newLatex:-Latex(expr);
```

which yields

## Gradients, Jacobians, Hessians, and high...

Inspired by the post "finding the Hessian (third order tensor) and higher order derivatives", I have written the following function which treats gradients, Jacobians, Hessians, and higher order derivatives in a unified way, implementing tensors as multidimensional Arrays:
```multiDiff := proc(expr::Array(algebraic),vars::list(symbol),n::posint)
local i,result;
if n > 1 then result := multiDiff(multiDiff(expr,vars,n - 1),vars,1)
else
result := Array(ArrayDims(expr),1..nops(vars),order = C_order);
```

## ToInert - pulling out specific arguments...

What is the canonical (and therefore also safe) way to pull out a specific argument of a function contained in the nested output from `ToInert`? I ask because it seems that using something like `op(n1...,op(nk,ToInert(expr))...)`, where `n1...nk` are positive integers, is a bad idea because the arguments can change locations depending on the exact expression being translated to inert form. For instance, inserting a specific shape in the `Matrix` constructor changes locations of all the other arguments of `_Inert_MATRIX`. Is it using iteratively something along the following lines?
 2 3 4 5 6 7 8 Last Page 4 of 12
﻿