mskalsi

290 Reputation

7 Badges

9 years, 190 days

MaplePrimes Activity


These are replies submitted by mskalsi

@Markiyan Hirnyk 

When I re-installed Maple 18 without updates, it also started working for but what could be the reason?

@tomleslie 

I have checked the details suggested by you but nothing found malfunctioning, but when I re-install Maple 18 "read" command started working again.

Anyway thank you very much.

@ecterrab 

Dear Sir

I have used ToJet command followed by indets command I can find coefficient of any kind differential in given expression. Please see Maple file.


with(PDEtools, declare, ToJet):

DepVars := [u(x, t), v(x, t)]

[u(x, t), v(x, t)]

(1)

alias(u = u(x, t), v = v(x, t))

u, v

(2)

PDE := 2*u*u[x]+3*alpha[1](t)*v*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(r(x), x, x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(s(x, t), x, t))*v

2*u*u[x]+3*alpha[1](t)*v*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v

(3)

ToJet(PDE, DepVars)

2*u*u[x]+3*alpha[1](t)*v*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v

(4)

The command "ToJet" is essential for identifying coefficients of differentials.

L := indets(2*u*u[x]+3*alpha[1](t)*v*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, specindex([u, v]))

{u[t], u[x], u[x, t], u[x, x], u[x, x, x], v[t], v[t, t], v[x, x]}

(5)

coeffs(2*u*u[x]+3*alpha[1](t)*v*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, L)

3*r(x)*s(x, t)*v+3*(diff(diff(r(x), x), x))*s(x, t)*u+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, 4*beta[1](t), gamma[1](t), 2*u, 3*alpha[1](t)*v, 1, 1

(6)

But the problem in this case is that, I need coefficients of "u" and "v" also, following trick seperately evaluate coefficients wrt "u" and "v", but this seems little impratical.

S := {u, v, u[t], u[x], u[x, t], u[x, x], u[x, x, x], v[t], v[t, t], v[x, x]}

{u[t], u[x], u[x, t], u[x, x], u[x, x, x], v[t], v[t, t], v[x, x], u, v}

(7)

This list will identify list of differentials whose coefficients are required, note that here we have identify this list forom (5) and "u" and "v" are also included in this list.

sys := {coeffs(2*u*u[x]+3*alpha[1](t)*v*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, S)}

{1, 2, 3*alpha[1](t), 4*beta[1](t), 3*(diff(diff(r(x), x), x))*s(x, t)+alpha[1](t)*(diff(r(x), x)), 3*r(x)*s(x, t)+beta[1](t)*(diff(diff(s(x, t), t), x)), gamma[1](t)}

(8)

This seems working perfectly fine as desired.

 

for EQ in sort([op(sys)], length) do EQ end do

1

 

2

 

gamma[1](t)

 

4*beta[1](t)

 

3*alpha[1](t)

 

3*r(x)*s(x, t)+beta[1](t)*(diff(diff(s(x, t), t), x))

 

3*(diff(diff(r(x), x), x))*s(x, t)+alpha[1](t)*(diff(r(x), x))

(9)

``


Download Command_for_Coefficients_in_differential_expression.mw

@ecterrab 

I have used dcoeffs earlier by converting derivatives to jet notations using "ToJet" command ("ToJet command was also suggested by you 2 months ago but in other case"). I have queries related to worksheet uploaded by you:

1. Where this "F" came from? When I execute your worksheet in my Maple 18 this "F" just disappears. So what is its actual role?

2.I need coefficients relative to {u, v, u[x], v[x]} only because these are real dependent variables in system of two PDEs and other functions are just variable coefficients, what should I need to modify?

See following Maple file also.


with(PDEtools, declare, ToJet):

DepVars := [u(x, t), v(x, t)]

[u(x, t), v(x, t)]

(1)

alias(u = u(x, t), v = v(x, t))

u, v

(2)

PDE := 2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(r(x), x, x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(s(x, t), x, t))*v

2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v

(3)

ToJet(PDE, DepVars)

2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v

(4)

L := indets(2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, specindex([u, v]))

{u[t], u[x], u[x, t], u[x, x], u[x, x, x], v[t], v[t, t], v[x, x]}

(5)

coeffs(2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, L)

3*r(x)*s(x, t)*v+3*(diff(diff(r(x), x), x))*s(x, t)*u+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, 4*beta[1](t), gamma[1](t), 2, 3*alpha[1](t), 1, 1

(6)

But the problem in this case is that, I need coefficients of "u" and "v" also, following trick seperately evaluate coefficients wrt "u" and "v", but this seems little impratical.

coeffs(2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, [u, v])

2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+v[t, t], 3*(diff(diff(r(x), x), x))*s(x, t)+alpha[1](t)*(diff(r(x), x)), 3*r(x)*s(x, t)+beta[1](t)*(diff(diff(s(x, t), t), x))

(7)

``


Download Command_for_Coefficients_in_differential_expression.mw

with(PDEtools, declare, ToJet):

DepVars := [u(x, t), v(x, t)]

[u(x, t), v(x, t)]

(1)

alias(u = u(x, t), v = v(x, t))

u, v

(2)

PDE := 2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(r(x), x, x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(s(x, t), x, t))*v

2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v

(3)

ToJet(PDE, DepVars)

2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v

(4)

L := indets(2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, specindex([u, v]))

{u[t], u[x], u[x, t], u[x, x], u[x, x, x], v[t], v[t, t], v[x, x]}

(5)

coeffs(2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, L)

3*r(x)*s(x, t)*v+3*(diff(diff(r(x), x), x))*s(x, t)*u+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, 4*beta[1](t), gamma[1](t), 2, 3*alpha[1](t), 1, 1

(6)

But the problem in this case is that, I need coefficients of "u" and "v" also, following trick seperately evaluate coefficients wrt "u" and "v", but this seems little impratical.

coeffs(2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+3*r(x)*s(x, t)*v+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+3*(diff(diff(r(x), x), x))*s(x, t)*u+v[t, t]+alpha[1](t)*(diff(r(x), x))*u+beta[1](t)*(diff(diff(s(x, t), t), x))*v, [u, v])

2*u[x]+3*alpha[1](t)*u[x, x]+4*beta[1](t)*u[x, t]*u[t]*v[x, x]+u[t]+gamma[1](t)*u[x, x, x]*u[t]*v[t]+v[t, t], 3*(diff(diff(r(x), x), x))*s(x, t)+alpha[1](t)*(diff(r(x), x)), 3*r(x)*s(x, t)+beta[1](t)*(diff(diff(s(x, t), t), x))

(7)

``


Download Command_for_Coefficients_in_differential_expression.mw

@Rouben Rostamian  

Discussion with peoples like is always useful. I found very simple command that suffice my need.

The command is "dsub"

See Maple file for detail.


with(PDEtools):

alias(u = u(x, t))

u

(1)

PDE1 := diff(u, x, t)+diff(u, x, x)+diff(u, t)

diff(diff(u, t), x)+diff(diff(u, x), x)+diff(u, t)

(2)

dsubs(diff(u, x) = 0, PDE1)

diff(u, t)

(3)

``

Thank you all once again.................

Download dsub_command.mw

@Rouben Rostamian  

That is now real work of programming. My problem was very basic, but was not that simple to implement in code. Thanks for your help.

@Markiyan Hirnyk

I do not understand, what you peoples are talking about. My problem is very simple and straight forward. I took your advice and written Maple code accordingly. See Maple file

Download assignment.mw

 

@Markiyan Hirnyk 

I want situation to be more like:

Suppose I wish to assign value to "a" as follow

a:=0;

then every time when "a" appears in expression, it will automatically vanish, e.g.

if you write

a^2+b*c+b^3;

this will return you

b*c+b^3

In same way I want to assign zero value to "diff(u,x)", so that everytime when higher derivatives of "diff(u,x)" appears in certain differential expression, that higher order dervative should automatically vanish.

Can you please tell where should I place this file Desolv.mpl ?

Should I place this somewhere in C drive where Maple is installed?

If yes, where?

@tomleslie 

Now it worked when I have inserted label. The equation label (1) was missing in original question.

Thanks for your kindness.

@Carl Love 

I think I am doing something wrong. Your suggestion of elementwise operator seems to be not working, please see below:


16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2, 48*a[2]^2*a[3]^2*delta[1]*delta[2]-80*a[3]^4*delta[1]*delta[2]-4*a[3]*b[3]*delta[1]*delta[2], 64*a[2]^3*a[3]*delta[1]*delta[2]-64*a[2]*a[3]^3*delta[1]*delta[2]-2*a[2]*b[3]*delta[1]*delta[2]-2*a[3]*b[2]*delta[1]*delta[2]

16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2, 48*a[2]^2*a[3]^2*delta[1]*delta[2]-80*a[3]^4*delta[1]*delta[2]-4*a[3]*b[3]*delta[1]*delta[2], 64*a[2]^3*a[3]*delta[1]*delta[2]-64*a[2]*a[3]^3*delta[1]*delta[2]-2*a[2]*b[3]*delta[1]*delta[2]-2*a[3]*b[2]*delta[1]*delta[2]

(1)

It possible for me to write (1) in the following form

for EQ in 16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2, 48*a[2]^2*a[3]^2*delta[1]*delta[2]-80*a[3]^4*delta[1]*delta[2]-4*a[3]*b[3]*delta[1]*delta[2], 64*a[2]^3*a[3]*delta[1]*delta[2]-64*a[2]*a[3]^3*delta[1]*delta[2]-2*a[2]*b[3]*delta[1]*delta[2]-2*a[3]*b[2]*delta[1]*delta[2] do EQ = 0 end do

16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2 = 0

 

48*a[2]^2*a[3]^2*delta[1]*delta[2]-80*a[3]^4*delta[1]*delta[2]-4*a[3]*b[3]*delta[1]*delta[2] = 0

 

64*a[2]^3*a[3]*delta[1]*delta[2]-64*a[2]*a[3]^3*delta[1]*delta[2]-2*a[2]*b[3]*delta[1]*delta[2]-2*a[3]*b[2]*delta[1]*delta[2] = 0

(2)

But I want to write (1) in the following form

16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2 = 0, 48*a[2]^2*a[3]^2*delta[1]*delta[2]-80*a[3]^4*delta[1]*delta[2]-4*a[3]*b[3]*delta[1]*delta[2] = 0, 64*a[2]^3*a[3]*delta[1]*delta[2]-64*a[2]*a[3]^3*delta[1]*delta[2]-2*a[2]*b[3]*delta[1]*delta[2]-2*a[3]*b[2]*delta[1]*delta[2] = 0

16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2 = 0, 48*a[2]^2*a[3]^2*delta[1]*delta[2]-80*a[3]^4*delta[1]*delta[2]-4*a[3]*b[3]*delta[1]*delta[2] = 0, 64*a[2]^3*a[3]*delta[1]*delta[2]-64*a[2]*a[3]^3*delta[1]*delta[2]-2*a[2]*b[3]*delta[1]*delta[2]-2*a[3]*b[2]*delta[1]*delta[2] = 0

(3)

"for EQ in 16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2 do  ∼:EQ = ∼0;od"

Error, invalid ∼

"for EQ in 16*a[2]^4*delta[1]^2-48*a[2]^3*a[3]*delta[1]*delta[2]-2*a[2]*b[2]*delta[1]^2 do  ∼:EQ = ∼0;od"

 

``


Download Maple_Query.mw

@Carl Love 

Dear all

I have work out problem that I had posted earlier, I am sharing it if anybody find this useful.

[526]_Commutator.mw

Actually everything was working good in Maple 18, but when I updated it then I start facing this problem. After update I unable to execute command int(f(t),t) for integration of unassigned function f(t), but when I use command Int(f(t),t) it worked well. Now what I did is I just uninstalled Maple 18 and re-installed it with any Update option, now command int(f(t),t) is working well.

@Rouben Rostamian  

You are right sir, I also realized so, thanks by the way for communicating.

@Adri van der Meer 

@ecterrab Dear Sir, being beginner to Maple programming I usually do poor tricks to workout my problems, but the cammand you have used in answering my query were really in my imagination. I am really grateful and feeling delighted to be member of this wonderful community of Mapleprime.

4 5 6 7 Page 6 of 7