mohammad1369

20 Reputation

3 Badges

7 years, 117 days

MaplePrimes Activity


These are replies submitted by mohammad1369

@Kitonum 

thank you so much, i used it & was so helpful for me, but i cant understand how it works, for example if i have more than tow functions i dont know how i can change it, or if i have different order derivatives of a function.

@Kitonum 

another question, if i have equation of derivative of some functions how i can classify derivatives of each function beside together?

for exaple: if i have

A:=a*diff(F(x,y),x,x)+b*diff(G(x,y),x,x)+c*diff(F(x,y),x,y)+d*diff(F(x,y),x,x)+e*diff(g(x,y),x,y)+f*diff(F(x,y),y,y)+g*diff(g(x,y),x,y)

i wan to write it like bellow:

A1:=(a+d)*diff(F(x,y),x,x)+c*diff(F(x,y),x,y)+f*diff(F(x,y),y,y)+b*diff(G(x,y),x,x)+e*diff(G(x,y),x,y)+g*diff(G(x,y),x,y)

@JohnS 

thank you for your description, my way to find  frequencies is useing of  Hamilton's principle, because it give me strong form of equations, and then i find frequencies by DQM, i solve these equations by hand & wrote matlab code for computting frequencies by DQM, but , i get wrong  frequencies, i guess that maybe i missd some terms of equations, because there are many terms ( about 50 pages). so im trying to solve theses by maple & to be sure that i wrot all of terms.

is there a way to know a function is derivative or not? for ex.

A:=diff(f(x,y),x)*g(x,y)

if op(1,A) is diff then do some things end

@JohnS 

in fact i have not a completely variational problem, i'm trying to find natural frequencies of a plate by hamilton principle as i explain in code.

with(IntegrationTools);
Int(`δU`-`δT`, t);
                     /                       
                    |                        
                    |  δU - δT dt
                    |                        
                   /                         
`δU` = Int(sigma__xx*`δϵ__xx`+sigma__xy*`δγ__xy`+sigma__xz*`δγ__xz`+sigma__yy*`δϵ__yy`+sigma__yz*`δγ__yz`+sigma__zz*`δϵ__zz`, x, y, z);
             /   /   /                                  
            |   |   |                                   
δU =  |   |   |  sigma__xx δϵ__xx
            |   |   |                                   
           /   /   /                                    

   + sigma__xy δγ__xy + sigma__xz δγ__xz

   + sigma__yy δϵ__yy

   + sigma__yz δγ__yz

   + sigma__zz δϵ__zz dx dy dz
NULL;
u = u__0(x, y)+z*psi__x(x, y);
                u = u__0(x, y) + z psi__x(x, y)
v = v__0(x, y)+z*psi__y(x, y);
                v = v__0(x, y) + z psi__y(x, y)
w = w(x, y);
                          w = w(x, y)
varepsilon__ij = .5*(diff(u__ii(x__i, x__j), x__j)+diff(u__jj(x__i, x__j), x__i));
                             /  d                     \
        varepsilon__ij = 0.5 |------ u__ii(x__i, x__j)|
                             \ dx__j                  /

                 /  d                     \
           + 0.5 |------ u__jj(x__i, x__j)|
                 \ dx__i                  /
sigma__ij = Q*varepsilon;
                    sigma__ij = Q varepsilon
NULL;
A := (diff(u__0(x, y), x))*delta(diff(v__0(x, y), x));
               / d            \      / d            \
          A := |--- u__0(x, y)| delta|--- v__0(x, y)|
               \ dx           /      \ dx           /
A := (diff(u__0(x, y), x))*(diff(`δv__0`(x, y), x));
               / d            \ / d                 \
          A := |--- u__0(x, y)| |--- x δv__0 y|
               \ dx           / \ dx                /
Int(A, x);
           /                                          
          |  / d            \ / d                 \   
          |  |--- u__0(x, y)| |--- x δv__0 y| dx
          |  \ dx           / \ dx                /   
         /                                            
NULL;
Int((diff(u__0(x, y), x))*(diff(`δv__0`(x, y), y)), x);
           /                                          
          |  / d            \ / d                 \   
          |  |--- u__0(x, y)| |--- x δv__0 y| dx
          |  \ dx           / \ dy                /   
         /                                            
NULL;
Parts(int(A, x), op(1, A));
                        / d            \
        x δv__0 y |--- u__0(x, y)|
                        \ dx           /

             /   /                /  2            \   \\
             |   |                | d             |   ||
           - |int|x δv__0 y |---- u__0(x, y)|, x||
             |   |                |   2           |   ||
             \   \                \ dx            /   //
NULL;

 

@tomleslie 

first equation is the answer that i want.

a:=diff(f(x,y),x)*diff(k(x,y),x);
IntegrationTools:-Parts(int(a, x), op(1,a));

@tomleslie 

no dont need to guess, i want to derivatives in delta operator  considere as dv in "Parts", so if there is no function that con do it, i think that i should use programming to solve these equations.

for example 

if whattype(op(1,op(2,A)))=diff   then Parts(Int(op(1,A)*op(1,op(2,A)),op(1,A)),x)

but what should i write instead of "whattype(op(1, op(2, A))) = diff" that return this op is differential form of a function or not?

thank  you for attention & your helpful guides.

@tomleslie 

as john said i want to use integration by parts to transform the derivatives of the variational functions to non-derivative terms, that i explain in code


 

with(IntegrationTools)

A := expand((diff(f(x, y), x)+g(x, y))*(diff(k(x, y), x)+h(x, y)))

(diff(f(x, y), x))*(diff(k(x, y), x))+(diff(f(x, y), x))*h(x, y)+g(x, y)*(diff(k(x, y), x))+g(x, y)*h(x, y)

(1)

AI := Parts(Int(op(1, A), x), op(1, op(1, A)))+Parts(Int(op(3, A), x), op(1, op(3, A)))+Int(op(2, A), x)+Int(op(4, A), x)

k(x, y)*(diff(f(x, y), x))-(Int(k(x, y)*(diff(diff(f(x, y), x), x)), x))+k(x, y)*g(x, y)-(Int(k(x, y)*(diff(g(x, y), x)), x))+Int((diff(f(x, y), x))*h(x, y), x)+Int(g(x, y)*h(x, y), x)

(2)

NULL

AI := Int((diff(f(x, y), x)+g(x, y))*delta(diff(f(x, y), x)+g(x, y)), x)

Int((diff(f(x, y), x)+g(x, y))*delta(diff(f(x, y), x)+g(x, y)), x)

(3)

NULL

diff(delta(f(x, y)), x)

(D(delta))(f(x, y))*(diff(f(x, y), x))

(4)

NULL

delta(diff(f(x, y), x)) = diff(`δf`(x, y), x)

delta(diff(f(x, y), x)) = diff(`δf`(x, y), x)

(5)

NULL

AI := delta(f(x, y))*(diff(f(x, y), x))-(Int(delta(f(x, y))*(diff(f(x, y), x, x)), x))+delta(f(x, y))*g(x, y)-(Int(delta(f(x, y))*(diff(g(x, y), x)), x))+Int((diff(f(x, y), x))*delta(g(x, y)), x)+Int(g(x, y)*delta(g(x, y)), x)

delta(f(x, y))*(diff(f(x, y), x))-(Int(delta(f(x, y))*(diff(diff(f(x, y), x), x)), x))+delta(f(x, y))*g(x, y)-(Int(delta(f(x, y))*(diff(g(x, y), x)), x))+Int((diff(f(x, y), x))*delta(g(x, y)), x)+Int(g(x, y)*delta(g(x, y)), x)

(6)

``


 

Download cc.mw

@Kitonum 

thank you for answering, please read my last comment, i explaned what i want to do:)

@tomleslie Kitonum 9259 

 i think i ask my question badly, i want to Parts just act on differential terms in V, for example in this case i want to it acts on diff(k),i know that I can expand it like in cod, but in my equations there are many terms like these and finding and writing them is so difficult for me. actually in my code delta operator of the calculus of variations  acts on (diff (k, x) + h) that i want to classify coefficient of del (k) & del (h),

thank you


 

with(IntegrationTools)

A := expand((diff(f(x, y), x)+g(x, y))*(diff(k(x, y), x)+h(x, y)))

(diff(f(x, y), x))*(diff(k(x, y), x))+(diff(f(x, y), x))*h(x, y)+g(x, y)*(diff(k(x, y), x))+g(x, y)*h(x, y)

(1)

AI := Parts(Int(op(1, A), x), op(1, op(1, A)))+Parts(Int(op(3, A), x), op(1, op(3, A)))+Int(op(2, A), x)+Int(op(4, A), x)

k(x, y)*(diff(f(x, y), x))-(Int(k(x, y)*(diff(diff(f(x, y), x), x)), x))+k(x, y)*g(x, y)-(Int(k(x, y)*(diff(g(x, y), x)), x))+Int((diff(f(x, y), x))*h(x, y), x)+Int(g(x, y)*h(x, y), x)

(2)

``


 

Download cc.mw

@tomleslie 

thank you for answering,

but i get wrong answer by this cod, i want to get A as writing in first line.
actually i want to 

U=diff(f(x,y),x)+g(x,y)   

dv=(diff(k(x,y),x)+h(x,y))dx

A := -(int((diff(f(x, y), `$`(x, 2)))*k(x, y), x))-(int((diff(g(x, y), x))*k(x, y), x))+(diff(f(x, y), x))*k(x, y)+g(x, y)*k(x, y)+int((diff(f(x, y), x))*h(x, y), x)+int(g(x, y)*k(x, y), x)

-(int((diff(diff(f(x, y), x), x))*k(x, y), x))-(int((diff(g(x, y), x))*k(x, y), x))+(diff(f(x, y), x))*k(x, y)+g(x, y)*k(x, y)+int((diff(f(x, y), x))*h(x, y), x)+int(g(x, y)*k(x, y), x)

(1)

with(IntegrationTools); A := (diff(f(x, y), x)+g(x, y))*(diff(k(x, y), x)+h(x, y)); AI := int(A, x); Expand(Parts(AI, op(1, A), op(2, A)))

(diff(f(x, y), x)+g(x, y))*(diff(k(x, y), x)+h(x, y))-(int((diff(diff(f(x, y), x), x))*(diff(k(x, y), x)), x))-(int((diff(diff(f(x, y), x), x))*h(x, y), x))-(int((diff(g(x, y), x))*(diff(k(x, y), x)), x))-(int((diff(g(x, y), x))*h(x, y), x))

(2)

``

``


 

Download ccc.mw

@tomleslie 

thank you for answering, but actually i want to receive to equation like bellow

and your code give me this:

@Kitonum Rouben Rostamian 

thank you for answering, it is so helpful for me, but i have another question:
if marix A have indexes how can I apply it to matrix in equations? for example:

A=[a,b;c,d]

B=[f,g]

no i want to calculate below equations:

Fx=Ax*Bx

Fy=Ay*By

Page 1 of 1