Question: How to plot and optimize a piecewise function?

Hi everybody,

This is my code:

assume(0 < a, 0 < L, a < L);

M := piecewise(0 <= x and x < a, P*x*(L-a)/L, a <= x and x < L, P*a*(L-x)/L);
ode := diff(y(x), `$`(x, 2)) = M/(E*I__0);
ic := y(0) = 0, y(L) = 0;
sol := factor(dsolve([ode, ic], y(x))); assign(sol); y1 := y(x);

I have two questions:

1) How to plot y1?

I would like to plot y1, but in the plot can to specify a values of a, L, P, E and I.

2) How can I find a maximun and minimun value of y1?

I tried to use maximize and minimize commands but really I don't know if I used them correctly.

Thank you.



Please Wait...