Question: Is this an endpoint of function composition?

Example

diff(w(x), x, x) = F*((6*(-a^2/(2*L^2)+a^3/(3*L^3)))*x+2*a^2/L-a^3/L^2)/EI

diff(diff(w(x), x), x) = F*(6*(-(1/2)*a^2/L^2+(1/3)*a^3/L^3)*x+2*a^2/L-a^3/L^2)/EI

(1)

Eval(lhs(diff(diff(w(x), x), x) = F*(6*(-(1/2)*a^2/L^2+(1/3)*a^3/L^3)*x+2*a^2/L-a^3/L^2)/EI), x = L) = (`@`(simplify, eval))(rhs(diff(diff(w(x), x), x) = F*(6*(-(1/2)*a^2/L^2+(1/3)*a^3/L^3)*x+2*a^2/L-a^3/L^2)/EI), x = L)

Eval(diff(diff(w(x), x), x), x = L) = -F*a^2*(L-a)/(L^2*EI)

(2)

Can the expression above be further shortened by function composition and function application (to a single group of arguments)? I tried

(`@`(Eval, lhs) = `@`(`@`(simplify, eval), rhs))(diff(diff(w(x), x), x) = F*(6*(-(1/2)*a^2/L^2+(1/3)*a^3/L^3)*x+2*a^2/L-a^3/L^2)/EI, x = L)

Error, (in evalapply) invalid input: lhs expects 1 argument, but received 2

 

which does not work.
Since the error message is clear I am looking for a single argument command that could replace lhs and rhs.  

Analog to evalf, which accepts an index, I tried to replace lhs by

op[1](diff(diff(w(x), x), x) = F*(6*(-(1/2)*a^2/L^2+(1/3)*a^3/L^3)*x+2*a^2/L-a^3/L^2)/EI)

diff(diff(w(x), x), x), F*(6*(-(1/2)*a^2/L^2+(1/3)*a^3/L^3)*x+2*a^2/L-a^3/L^2)/EI

(3)

to do the same as

op(1, diff(diff(w(x), x), x) = F*(6*(-(1/2)*a^2/L^2+(1/3)*a^3/L^3)*x+2*a^2/L-a^3/L^2)/EI)

diff(diff(w(x), x), x)

(4)

Unfortuenatly this does not work. Are there any other options or have I reached an end point?

Would a single argument variant of op make sense for other purposes than the example above?


Download replacement_of_lhs_and_rhs_by_single_argument_function.mw

Please Wait...