Question: Are subscripts messing up my derivative?

Sorry, I have not used Maple for a long time...

I would like to know the derivative of Jy w.r.t. py1 in the following. I expect the answer to be 2 Wy6 py1-2 Wy6 py10 but I get 0. Am I not using the subscripts properly that Maple is not understanding me?


 

J__y := (1/2)[W__y1(a[c]^y-(diff(S[1](t), t, t))^y)^2+W__y2((diff(S[1](t), t))^y)^2+W__y3(S[1]^y)^2+W__y4(`#mscripts(mi("φ",fontstyle = "normal"),mi("c"),none(),none(),mo("."),none(),none())`-`#mscripts(mi("φ",fontstyle = "normal"),mi("S"),none(),none(),mo("."),none(),none())`)^2+W__y5(`φ__S`)^2+W__y6(p__y1-p__y10)^2+W__y7(p__y2-p__y20)^2+W__y8(p__y3-p__y30)^2+W__y9(p__y4-p__y40)^2]

(1/2)[W__y1(a[c]^y-(diff(diff(S[1](t), t), t))^y)^2+W__y2((diff(S[1](t), t))^y)^2+W__y3(S[1]^y)^2+W__y4(`#mscripts(mi("φ",fontstyle = "normal"),mi("c"),none(),none(),mo("."),none(),none())`-`#mscripts(mi("φ",fontstyle = "normal"),mi("S"),none(),none(),mo("."),none(),none())`)^2+W__y5(phi__S)^2+W__y6(p__y1-p__y10)^2+W__y7(p__y2-p__y20)^2+W__y8(p__y3-p__y30)^2+W__y9(p__y4-p__y40)^2]

(1)

diff(p[y*i](t), t) := K[yp*i](p[y*i]-p[y0*i])-K[py*i]*(diff(Jy, p[y*i]))

K[yp*i](p[y*i]-p[y0*i])-K[py*i]*(diff(Jy, p[y*i]))

(2)

Diff(J__y, p__y1)

Diff((1/2)[W__y1(a[c]^y-(diff(diff(S[1](t), t), t))^y)^2+W__y2((diff(S[1](t), t))^y)^2+W__y3(S[1]^y)^2+W__y4(`#mscripts(mi("φ",fontstyle = "normal"),mi("c"),none(),none(),mo("."),none(),none())`-`#mscripts(mi("φ",fontstyle = "normal"),mi("S"),none(),none(),mo("."),none(),none())`)^2+W__y5(phi__S)^2+W__y6(p__y1-p__y10)^2+W__y7(p__y2-p__y20)^2+W__y8(p__y3-p__y30)^2+W__y9(p__y4-p__y40)^2], p__y1)

(3)

NULL

``


 

Download cost_function_partial_derivative.mw

Please Wait...