0

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$$

MrYouMath
  • 15,833

3 Answers3

1

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       /
acer
  • 5,293
  • 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); – acer Mar 23 '16 at 01:32
  • 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)]" – MrYouMath Mar 23 '16 at 11:51
  • 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. – acer Mar 23 '16 at 13:58
  • Thank you alot :D. It worked like a charm. I had to use restart. – MrYouMath Mar 23 '16 at 14:28
0

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)]);
MrYouMath
  • 15,833
-1

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

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

enter image description here

JJacquelin
  • 66,221
  • 3
  • 37
  • 87