D/dx' (x) ? WTF

Hi there
I'm working with some derivatives which I am having a lot of trouble with.
Here are the 2 forms I'm stuck on:

(1) d/dx (x')^2 , where x is a function of t and x' is the first derivative of x with respect to t.

(2) d/dx' (x) , same conditions as above, never seen one of these before.

Can anyone help me with the general solutions to these problems?
I think the answer to the first one is 2x'' where x'' is the second derivative of x with respect to t, but I'm really not sure and I have no idea with the second one.

That, unfortunately, is half the problem.
x(t) is undefined so I don't even have an example to work with.
I was hoping someone would have come across problems like this before, and would know the general form of how to solve them.
If it helps at all this is to solve an Euler-Lagrange problem.

Thanks dexter.
I hadn't seen either of those before. All I've got is some illegible notes to work from. I understand the first one now but what exactly is that on the right hand side in the second one? And what do the i's and j's represent?

I don't think the first question was related to mechanics, but was just a mathematical aspect.

However, in Lagrangian mechanics, the variables q, q' are not independent....I suppose you meant Hamiltonian mechanics with (q,p) ??

To smellymoron : the right answer is given by the Gateaux derivatives (every other calculation or formalism is a mathematical nonsense) : so that the answers should be :

1) 2x'(t)^2
2) x'(t)

Take a look at every book on variational calculus, you will see they use the Euler trick (Gateaux derivative) to find the extrema of the action with respect to the motion :

in this case you have the action : [tex] S[x]=\int_a^b L(x,x',t)dt [/tex]

where L is the Lagrangian which is mathematically a functional of the motion and it's derivatives. The Euler-Lagrange equations are then obtained by finding the extrema of the action : suppose X is an extremum, then for every function n, such that n(a)=n(b)=0 we have :