I have a function f in two variables y and theta, where y=z^2+x^2. There are numerical values for x,z,and theta ( x and z are the dimensions),I have to do calculations to obtain the velocity, so I need a way to express the vector of velocity in two components x and z separately.The following is a simple example of my task:
f[y_,θ_] = 2 y Cos θ + 4 y^2 (1 - 3 Cos θ)
gradf[y_, θ_] = Grad[f[y, θ], {y, θ}]
v[y_, θ_] = f[y, θ]/gradf[y, θ]
I made the below way, but it is not correct.
v[(z^2 + x^2) _, θ_] = f[y, θ]/gradf[y, θ]
I need separation of variables as components of vector, where:
z = {0.026239934196048018`, 0.031239934196048022`,
0.03623993419604802`, 0.04123993419604802`, 0.04623993419604802`,
0.05123993419604802`};
x = {-0.0065135092956195365`, -0.0065135092956195365`,
-0.0065135092956195365`, -0.0065135092956195365`,
-0.0065135092956195365`, -0.0065135092956195365`};
k = Sqrt[y]= Sqrt[z^2 + x^2]
θ = ArcCos[z/k]
Thank you.