MVandborg

5 Reputation

One Badge

5 years, 285 days

MaplePrimes Activity


These are questions asked by MVandborg

I have some trouble solving the pde of:
ut + u^2*ux = u, u(x,0) = x, with x::real and t>0.

I think that I have 2 problems.

1.
The first part of the code I define u(x,t) with both the variable rp.
Then I define the variable q copying the definition of u(x,t).
When I try to insert q and u(x,t) in the initial equation - one is able to be reduced to one term while the other isn't.
So I'm not really sure what is happening here.

2.
When I use Maple's pdsolve() I get a result, but when I insert the answer in the initial equation - then it isn't correct.
I tried to show this in the last part of the code.

 

 

 

# ut + u^2*ux = u, u(x,0) = x

restart

rp := (-1 + sqrt(1 + 4*exp(t)^2*t*x))/(2*exp(t)^2*t);

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/((exp(t))^2*t)

(1)

u := (x,t) -> rp*exp(t):
'u(x,t)' = u(x,t);

u(x, t) = (1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)

(2)

q := (-1 + sqrt(1 + 4*exp(t)^2*t*x))/(2*exp(t)*t); # Copying the result from above and defining q the same

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)

(3)

# Now doing the same operations on supposedly the same term, but one is able to be reduced with assumptions while the other isn't.

L_nothing := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) ;
L_real := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming x::real;
L_t := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming t>0;
L_all := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming t>0, x::real;

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)

 

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)

(4)

L_nothing := diff(q,t) + q^2*diff(q,x) ;
L_real := diff(q,t) + q^2*diff(q,x) assuming x::real;
L_t := diff(q,t) + q^2*diff(q,x) assuming t>0;
L_all := diff(q,t) + q^2*diff(q,x) assuming t>0, x::real;

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

(5)

restart

pde := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) = u(x,t);
ic := u(x,0) = x;

diff(u(x, t), t)+u(x, t)^2*(diff(u(x, t), x)) = u(x, t)

 

u(x, 0) = x

(6)

pdsolve([pde, ic]);

u(x, t) = exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)/(exp(2*t)-1)

(7)

u := (x,t) -> exp(t)*(sqrt(2*exp(2*t)*x - 2*x + 1) - 1)/(exp(2*t) - 1);

proc (x, t) options operator, arrow; exp(t)*(sqrt(2*exp(2*t)*x-2*x+1)-1)/(exp(2*t)-1) end proc

(8)

L := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming t>0, x::real;

exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)/(exp(2*t)-1)+2*exp(t)*exp(2*t)*x/((2*exp(2*t)*x-2*x+1)^(1/2)*(exp(2*t)-1))-2*exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)*exp(2*t)/(exp(2*t)-1)^2+(1/2)*(exp(t))^3*((2*exp(2*t)*x-2*x+1)^(1/2)-1)^2*(2*exp(2*t)-2)/((exp(2*t)-1)^3*(2*exp(2*t)*x-2*x+1)^(1/2))

(9)

LL := simplify(L) = u(x,t)

exp(t)*(2*exp(2*t)*x-(2*exp(2*t)*x-2*x+1)^(1/2)-2*x+1)/((2*exp(2*t)*x-2*x+1)^(1/2)*(exp(2*t)-1)) = exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)/(exp(2*t)-1)

(10)

evalb(LL)

false

(11)

# Obviously not correct solution... or what?

``

 

 

Download asol1-1.mw

 

 

Page 1 of 1