Here's one way, but not using Part (cannot use Part[.., 2] when the first argument has length 1):
ClearAll[f];
f[k__: x] := Plot[# &[k], {x, 0, 10}, Evaluate[##2 &[k]]]
Some alternatives:
ClearAll[f];
f[k__: x] := ReleaseHold@Insert[Hold[Plot[k]], {x, 0, 10}, {1, 2}]
ClearAll[f];
f[k__: x] := Plot[# &[k], {x, 0, 10}, Evaluate@Drop[{k}, 1]] (* see note 3 *)
Notes:
The triple-underscore pattern k___ matches an empty sequence, such as the arguments of f[], so the default x in k___ : x is never used. With two underscores k__ : x, the default x is used when the length of the argument sequence is less than 1.
In the single argument case, e.g., f[x^2], the expressed desire to use k[[2]] would result in an error if the length of k is less than 2, even if {k}[[2]] were used.
In the last alternative, one might apply Sequence to the result of Drop (Evaluate[Sequence @@ Drop[{k}, 1]]) to be more exact. Since Plot accepts a List of options, the code works as is in this use case. In another application, Sequence may be necessary.
Sequencekin{}in order to usePart? I mean something likef[k___ : x] := Plot[{k}[[1]], {x, 0, 10}, {k}[[2]]]. – Henrik Schumacher Mar 17 '18 at 10:37k___matches an empty sequence, such as the arguments off[], so the defaultxink___ : xis never used; I think you want two underscoresk__ : x. In the single argument case, e.g.,f[x^2], you cannot usek[[2]]or{k}[[2]]. – Michael E2 Mar 17 '18 at 13:18