Clear[var, expr, blah, g, derivatives];
var = Input["Type a variable, such as x, in this window."];
expr = Input[ "Type an expression to be differentiated in the variable you just typed in the last window."];
g[blah_] = expr /. {var -> blah};
derivatives := {g[var], g'[var]}
Plot[{derivatives}, {x, -3, 5}, {PlotLabel -> "A function and its Derivative",
PlotLabel -> Automatic, PlotRange -> All}]
All I'm trying to do is label my curves on the graph as whatever that curve is, such as the function "2x^2" and then I want the derivative to be labeled also, so "4x"..And I mean labeled on the actual curves, not the legend on the side (I know how to do that).. It appears my PlotLabel and PlotRange aren't doing anything at all. Do I have to be more specific in PlotLabel? I thought of extracting each element such as derivative[[1]] for the function and derivative[[2]] for the actual derivative and then naming those somehow... I feel like I'm missing something easy.