0
$\begingroup$

Lets say I have the heat equation:

$$u_t-u_{xx}=0.$$

I want to apply the following substitution to the heat equation in Maple.

$$\zeta=t/x^2$$ $$u(x,t)=x^cF(t/x^2)=x^cF(\zeta)$$

How can i achive this?

The result should be:

$$cF-c^2F+\frac{d F}{d\zeta}-6\zeta\frac{d F}{d\zeta}+4c\zeta\frac{d F}{d\zeta}-4\zeta^2\frac{d^2 F}{d \zeta^2}=0$$

$\endgroup$

3 Answers 3

1
$\begingroup$

In Maple, you could do it like so,

eq := diff(u(x,t),t) - diff(u(x,t),x,x) = 0:
s1 := t/x^2 = xi(x,t):
s2 := u(x,t) = x^c*F(t/x^2):

eval(eq, [s2, s1]):
normal( simplify( %, {s1} ) ):
simplify( %/x^(c-2), power ):

And, depending on how you want xi and the derivatives represented,

convert( subs(xi(x,t)=xi,%), diff );

And terms may be grouped together,

#simplify(%,size);
collect(%,diff,factor);

                                     /  2        \                          
                    / d        \     | d         |   2                      
(4 c xi - 6 xi + 1) |---- F(xi)| - 4 |----- F(xi)| xi  - F(xi) c (c - 1) = 0
                    \ dxi      /     |    2      |                          
                                     \ dxi       /
$\endgroup$
4
  • $\begingroup$ You can also try some variant of the following command, before the above Maple code, if you'd like derivatives wrt xi to be typeset with prime notation, or arguments to various function calls to be suppressed, or partials of u(x,t) to be typeset with subscript notation, etc. PDEtools[declare](xi(x,t), F(xi), prime=xi); $\endgroup$
    – acer
    Mar 23, 2016 at 1:32
  • $\begingroup$ Thank you alot acer :). This seems to be promissing:). But at the line with "eval(eq, [s2,s1]): i get the following error "Error, invalid input: eval expects its 2nd argument, eqns, to be of type {integer, equation, set(equation)}, but received [s2, t/x^2 = xi(x, t)]" $\endgroup$
    – MrYouMath
    Mar 23, 2016 at 11:51
  • $\begingroup$ You should not have received that error message if you have indeed executed the line of code (above) which assigned to s2. Perhaps you omitted that line of the above code? I suggest trying it first by issuing restart and then running all those code lines above, in order. $\endgroup$
    – acer
    Mar 23, 2016 at 13:58
  • $\begingroup$ Thank you alot :D. It worked like a charm. I had to use restart. $\endgroup$
    – MrYouMath
    Mar 23, 2016 at 14:28
0
$\begingroup$

I found a better approach to this problem, that is why I wanted to share this approach:

gc();
restart;
with(PDEtools);

declare(u(x, t), F(z));

heat := diff(u(x, t), t)-(diff(u(x, t), `$`(x, 2))) = 0;
tr := {t = X^2/Z, x = X, u(x, t) = X^c*F(Z)};
dchange(tr, heat, [X, Z, F(Z)]);
$\endgroup$
-1
$\begingroup$

I don't see how Maple is involved in this.

Nevertheless, I agree with the expected result, as shown below :

enter image description here

$\endgroup$
1
  • $\begingroup$ I wanted to know how this is managed in Maple. I allready know how to do it by hand. $\endgroup$
    – MrYouMath
    Mar 23, 2016 at 11:48

You must log in to answer this question.

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