mskalsi

290 Reputation

7 Badges

9 years, 318 days

MaplePrimes Activity


These are replies submitted by mskalsi

@nm 

The assume command does not work in the desired way when used in partial derivatives, please see simplification below:

with(PDEtools):

DepVars := [u(x, y, t), U(xi, eta)]; 1; alias(u = u(x, y, t))

[u(x, y, t), U(xi, eta)]

 

u

(1)

xi[1] := 1/2*(x^2+y^2); 1; xi[2] := t; 1; u := (h(t)+(x^2+y^2)*(1/2))*arccos(x/sqrt(x^2+y^2))/t+U(xi[1], xi[2])

(1/2)*x^2+(1/2)*y^2

 

t

 

(h(t)+(1/2)*x^2+(1/2)*y^2)*arccos(x/(x^2+y^2)^(1/2))/t+U((1/2)*x^2+(1/2)*y^2, t)

(2)

(diff(u, x))*(diff(u, y))

(x*arccos(x/(x^2+y^2)^(1/2))/t-(h(t)+(1/2)*x^2+(1/2)*y^2)*(1/(x^2+y^2)^(1/2)-x^2/(x^2+y^2)^(3/2))/((1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*x)*(y*arccos(x/(x^2+y^2)^(1/2))/t+(h(t)+(1/2)*x^2+(1/2)*y^2)*x*y/((x^2+y^2)^(3/2)*(1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*y)

(3)

`assuming`([simplify(subs(1/2*(x^2+y^2) = xi, t = eta, (x*arccos(x/(x^2+y^2)^(1/2))/t-(h(t)+(1/2)*x^2+(1/2)*y^2)*(1/(x^2+y^2)^(1/2)-x^2/(x^2+y^2)^(3/2))/((1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*x)*(y*arccos(x/(x^2+y^2)^(1/2))/t+(h(t)+(1/2)*x^2+(1/2)*y^2)*x*y/((x^2+y^2)^(3/2)*(1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*y)))], [x::real, y::real, y > 0])

(1/4)*(2*(D[1](U))(table( [( 1 ) = (1/2)*x^2+(1/2)*y^2, ( 2 ) = eta ] ), eta)*eta*x^3+2*(D[1](U))(table( [( 1 ) = (1/2)*x^2+(1/2)*y^2, ( 2 ) = eta ] ), eta)*eta*x*y^2+2*arccos(x/(x^2+y^2)^(1/2))*x^3+2*arccos(x/(x^2+y^2)^(1/2))*x*y^2-x^2*y-y^3-2*h(eta)*y)*(2*(D[1](U))(table( [( 1 ) = (1/2)*x^2+(1/2)*y^2, ( 2 ) = eta ] ), eta)*eta*x^2*y+2*(D[1](U))(table( [( 1 ) = (1/2)*x^2+(1/2)*y^2, ( 2 ) = eta ] ), eta)*eta*y^3+2*arccos(x/(x^2+y^2)^(1/2))*x^2*y+2*arccos(x/(x^2+y^2)^(1/2))*y^3+x^3+x*y^2+2*h(eta)*x)/((x^2+y^2)^2*eta^2)

(4)

NULL

Download Ques_Mapleprime.mw

@Tatowills 

Thanks for your comment, by taking a11=0 and a21=0 worked for me. Sorry, as I saw your comment so late.

@Torre 

Please see my queries below:

  1. Why there is extra negative sign in one flux?
  2. How to deal with case of three independent variables.


 

with(DifferentialGeometry)with(JetCalculus)NULL

DGsetup([x, t], [u], E, 1)

L := alpha*u[]*u[1]+beta*u[1]-u[]*u[1, 1, 1]-3*u[1]*u[1, 1]+u[2]-u[1, 1, 2]

alpha*u[]*u[1]+beta*u[1]-u[]*u[1, 1, 1]-3*u[1]*u[1, 1]+u[2]-u[1, 1, 2]

(1)

EulerLagrange(L)

[0]

(2)

omega5 := evalDG((alpha*u[]*u[1]+beta*u[1]-u[]*u[1, 1, 1]-3*u[1]*u[1, 1]+u[2]-u[1, 1, 2])*`&w`(Dx, Dt))

_DG([["biform", E, [2, 0]], [[[1, 2], alpha*u[]*u[1]+beta*u[1]-u[]*u[1, 1, 1]-3*u[1]*u[1, 1]+u[2]-u[1, 1, 2]]]])

(3)
E > 

HorizontalHomotopy(omega5)

_DG([["biform", E, [1, 0]], [[[1], (1/3)*u[1, 1]-u[]], [[2], (1/2)*alpha*u[]^2-u[]*u[1, 1]-u[1]^2-(2/3)*u[1, 2]+beta*u[]]]])

(4)

How  can I identify respective fluxes? As I can see from "TotalDiff" command, the component multipled with Dx is t-flux(ignoring negative sign) and component multiplied with Dt is x-flux. Please see below

E > 

TotalDiff((1/3)*u[1, 1]-u[], t)+TotalDiff((1/2)*alpha*u[]^2-u[]*u[1, 1]-u[1]^2-(2/3)*u[1, 2]+beta*u[], x)

-u[2]-(1/3)*u[1, 1, 2]+(alpha*u[]+beta-u[1, 1])*u[1]-2*u[1]*u[1, 1]-u[]*u[1, 1, 1]

(5)

Which is not equal to original expression (1). But if I ignore negative sign in Dx component of (4), then I have

E > 

TotalDiff(-(1/3)*u[1, 1]+u[], t)+TotalDiff((1/2)*alpha*u[]^2-u[]*u[1, 1]-u[1]^2-(2/3)*u[1, 2]+beta*u[], x)

u[2]-u[1, 1, 2]+(alpha*u[]+beta-u[1, 1])*u[1]-2*u[1]*u[1, 1]-u[]*u[1, 1, 1]

(6)
E > 

simplify(u[2]-u[1, 1, 2]+(alpha*u[]+beta-u[1, 1])*u[1]-2*u[1]*u[1, 1]-u[]*u[1, 1, 1])

alpha*u[]*u[1]+beta*u[1]-u[]*u[1, 1, 1]-3*u[1]*u[1, 1]+u[2]-u[1, 1, 2]

(7)

Which is actually an original expression (1). Is ignoring negative sign is correct?

I guess the negative has some relation to limits of integrals in definition of homotopy operator, am I right?
What is correct way to extract fluxes? So that the correct divergence expression may be achived like (7).

Please also explain, how to extract fluxes when there are three independent variables. Please see Khokhlov–Zabolotskaya equation.

E > 

restart

E > 

with(DifferentialGeometry):with(JetCalculus):``NULL

E > 

DGsetup([x, y, t], [u], E, 1):

E > 

M := -u[]*u[1, 1]-u[1]^2+u[1, 2]-u[2, 2]

-u[]*u[1, 1]-u[1]^2+u[1, 2]-u[2, 2]

(8)
E > 

EulerLagrange(M)

[0]

(9)
E > 

omega5 := evalDG((-u[]*u[1, 1]-u[1]^2+u[1, 2]-u[2, 2])*`&w`(`&w`(Dx, Dy), Dt))

_DG([["biform", E, [3, 0]], [[[1, 2, 3], -u[]*u[1, 1]-u[1]^2+u[1, 2]-u[2, 2]]]])

(10)
E > 

HorizontalHomotopy(omega5)

_DG([["biform", E, [2, 0]], [[[1, 3], u[2]-(1/2)*u[1]], [[2, 3], (1/2)*u[2]-u[1]*u[]]]])

(11)

Now how can I identify fluxes corresponding x, y, and t components?

E > 

``


 

Download [1289]_Homotopy.mw

@Kitonum 

When I exported plot in JPEG format, the image quality is degraded, why it is so?

 

Why another site for Maple when MaplePrime is performing good ?

@Markiyan Hirnyk 

My question has been answered by calculating critical points of given function by using standard definitions of differential calculus. The Max and Min are visible from plot of function. What if only plot is given i.e. when function is not given, then how I can find critical points ?

I am sorry as this query is not reflected in my qriginal question.

@Markiyan Hirnyk 

I am interested in derivative. In fact my aim is to extract Maxima and Minima from plot.

@John Fredsted 

That is true but how should I proceed in my case ?

In meantime my problem is solved using JetCalculus[Euler-Lagrange].

@Carl Love 

I am sorry I could not express my problem properly. In my second reply I have explained what actually I am wanting to do.

Thank you ver much. Please respond to second reply too.

@Carl Love 

I asked this query becuase I am trying to perform Maple calculations for power series solution of an ODE and I need to verifiy coefficients with my manual caluclations. Here I give you one example.


 

F := sum(P[n]*xi^n, n = 0 .. infinity);

sum(P[n]*xi^n, n = 0 .. infinity)

(1)

ode := F^2+2*b*(diff(F, xi))+F*(diff(F, xi, xi))

(sum(P[n]*xi^n, n = 0 .. infinity))^2+2*b*(sum(P[n]*xi^n*n/xi, n = 0 .. infinity))+(sum(P[n]*xi^n, n = 0 .. infinity))*(sum(P[n]*xi^n*n^2/xi^2-P[n]*xi^n*n/xi^2, n = 0 .. infinity))

(2)

``

Actually I want to construct power series solution for above ODE by considering expansion (1). For this I need to find coefficient of xi^0 .. xi^nin the expansion (2)". "There is power series solution option in dsolve which I have not tried yet. Rather I would like to make manual calculations.


 

Download Power_Series_solution.mw

@Carl Love 
Suppose I go with coefficient of xi^2, then it must be like:


 

Suppose I have a expression whose terms are in summation:

sum(P[n]*xi^n, n = 0 .. infinity)+(sum(P[n]*xi^n, n = 0 .. infinity))^2+sum(P[2*n+1]*P[2*n]*xi^n, n = 0 .. infinity)

sum(P[n]*xi^n, n = 0 .. infinity)+(sum(P[n]*xi^n, n = 0 .. infinity))^2+sum(P[2*n+1]*P[2*n]*xi^n, n = 0 .. infinity)

(1)

diff(sum(P[n]*xi^n, n = 0 .. infinity)+(sum(P[n]*xi^n, n = 0 .. infinity))^2+sum(P[2*n+1]*P[2*n]*xi^n, n = 0 .. infinity), xi)

sum(P[n]*xi^n*n/xi, n = 0 .. infinity)+2*(sum(P[n]*xi^n, n = 0 .. infinity))*(sum(P[n]*xi^n*n/xi, n = 0 .. infinity))+sum(P[2*n+1]*P[2*n]*xi^n*n/xi, n = 0 .. infinity)

(2)

In above summation, how I can write specific term ? For example, how I can display term for n = 2etc.

coeff(eval(%, infinity = 2), xi, 2)*xi^2;

6*P[1]*P[2]*xi^2

(3)

But is expression (2) the coefficient of xi^2must be like:

3*P[3]+2*(3*P[0]*P[3]+2*P[1]*P[2]+P[1]*P[2])+3*P[7]*P[6]

6*P[0]*P[3]+6*P[1]*P[2]+3*P[6]*P[7]+3*P[3]

(4)

``


 

Download Summation.mw

@acer 

I think you are addressing my stackoverlow query which I had written in simple manner as I was expecting some clue from there.

Although you did great by printing the results as required but how I can modify above code to run for composite function actually given in worksheet. For example,

U(xi(x,y,t),eta(x,y,t),tau(x,y,t)) ?

Further, after displaying results in desired manner I will also collect coefficient with respect various derivatives like U[xi], U[eta], U[tau], U[xi,xi].......etc.

I am trying to do like this:


 

xi := proc (x, y, t) options operator, arrow; xi(x, y, t) end proc; 1; tau := proc (x, y, t) options operator, arrow; tau(x, y, t) end proc; 1; tau := proc (x, y, t) options operator, arrow; tau(x, y, t) end proc

proc (x, y, t) options operator, arrow; xi(x, y, t) end proc

 

proc (x, y, t) options operator, arrow; tau(x, y, t) end proc

 

proc (x, y, t) options operator, arrow; tau(x, y, t) end proc

(1)

U := proc (xi, tau, eta) options operator, arrow; U(xi, tau, eta) end proc

proc (xi, tau, eta) options operator, arrow; U(xi, tau, eta) end proc

(2)

diff(U(xi, tau, eta), x)

Error, (in U) too many levels of recursion

 

``


 

Download A_trial.mw

Regards

1 2 3 4 5 6 7 Page 1 of 7