disruptive

42 Reputation

2 Badges

18 years, 136 days

MaplePrimes Activity


These are replies submitted by disruptive

Yes but I dont see what I am looking for. I want to be able to perform a differentiation with respect to a vector on a quantity that contains say for example a chain of vectors. I have copied some code into here A:= Vector([xA,yA,zA]); B:= Vector([xB,yB,zB]); C:= Vector([xC,yC,zC]); theta:= arccos( innerprod(A-B,C-B) / (norm(A-B,2) * norm(C-B,2))); U := k(1 - cos(theta0)*cos(theta) + sin(theta)*sin(theta0)); I would like to perform a differentiation on U with respect to the vector A for example and then take the x component. I can do the latter but how do I do this differentiation with maple. It is easy enough to see by hand. Thanks
Yes but I dont see what I am looking for. I want to be able to perform a differentiation with respect to a vector on a quantity that contains say for example a chain of vectors. I have copied some code into here A:= Vector([xA,yA,zA]); B:= Vector([xB,yB,zB]); C:= Vector([xC,yC,zC]); theta:= arccos( innerprod(A-B,C-B) / (norm(A-B,2) * norm(C-B,2))); U := k(1 - cos(theta0)*cos(theta) + sin(theta)*sin(theta0)); I would like to perform a differentiation on U with respect to the vector A for example and then take the x component. I can do the latter but how do I do this differentiation with maple. It is easy enough to see by hand. Thanks
> vatt:= (r,b,rc) -> -epsilon*(cos(Pi*(r-rc)/(2*wc)))^2; > VattR := proc(r,b) > rc:= evalf(b*2^(1/6));if r < rc then RETURN(-epsilon) elif rc <= r and r <= (rc+wc) then RETURN(vatt(r,b,rc)) else RETURN(0) end if; > end proc; The above is a typical function. E for example is made up of a number of these and I would like to minimise the value of E. \ 2 wc / > VattR := proc(r,b) > rc:= evalf(b*2^(1/6));if r < rc then RETURN(-epsilon) elif rc <= r and r <= (rc+wc) then RETURN(vatt(r,b,rc)) else RETURN(0) end if; > end proc;
> vatt:= (r,b,rc) -> -epsilon*(cos(Pi*(r-rc)/(2*wc)))^2; > VattR := proc(r,b) > rc:= evalf(b*2^(1/6));if r < rc then RETURN(-epsilon) elif rc <= r and r <= (rc+wc) then RETURN(vatt(r,b,rc)) else RETURN(0) end if; > end proc; The above is a typical function. E for example is made up of a number of these and I would like to minimise the value of E. \ 2 wc / > VattR := proc(r,b) > rc:= evalf(b*2^(1/6));if r < rc then RETURN(-epsilon) elif rc <= r and r <= (rc+wc) then RETURN(vatt(r,b,rc)) else RETURN(0) end if; > end proc;
Page 1 of 1