Coordinate Mapping



On 06-10-2013 23:29, Paul Lange wrote:
> I'm trying to reconstruct coordinate mapping as described here 
> starting at page 2: 
> http://www3.nd.edu/~gtryggva/CFD-Course/2011-Lecture-24.pdf 
> <http://www3.nd.edu/%7Egtryggva/CFD-Course/2011-Lecture-24.pdf>;
>
> I started with the 1D example, what I did is:
>
> 1: depends(f, x);
> 2: depends(x, a);
> 3: diff(f, x);
> 4: diff(f, a);
> 5: diff(f, x, 2);
> 6: diff(f, a, 2);
>

Try:

(%i1) display2d:false$

(%i2) depends(f, x, x, a);

(%o2) [f(x),x(a)]
(%i3) eq1: 'diff(f, a) = diff(f,a);

(%o3) 'diff(f,a,1) = 'diff(f,x,1)*'diff(x,a,1)
(%i4) eq2: first( solve(eq1, 'diff(f,x,1)));

(%o4) 'diff(f,x,1) = 'diff(f,a,1)/'diff(x,a,1)
(%i5) eq3: 'diff(f, a, 2) = diff(f,a,2);

(%o5) 'diff(f,a,2) = 'diff(f,x,1)*'diff(x,a,2)+'diff(f,x,2)*('diff(x,a,1))^2
(%i6) eq4: expand (subst (eq2, first ( solve (eq3, 'diff(f,x,2)))));

(%o6) 'diff(f,x,2) = 'diff(f,a,2)/('diff(x,a,1))^2
                    -'diff(f,a,1)*'diff(x,a,2)/('diff(x,a,1))^3

Regards,
Jaime