Recommended Posts

I'd like to solve an equation similar to the following:
H(x,p) = |p|^2 + x.p
where both x and p are 2-element vectors, |p| is the euclidean norm (vector length) |p| = sqrt( p_x^2 + p_y^2 ), and x.p is the dot product of x and p.
I'm trying to solve this for |p| in H(x,p) = 0.
Any hints or suggestions on how to go about doing this would be greatly appreciated!

That's a circle centered around (-x1/2,-x2/2) which passes through the origin. You can get all your solutions in a parametric way. If we define r:=(x1^2+x2^2)/4,

p1 = -x1/2 + r*cos(t)p2 = -x2/2 + r*sin(t)

This is now the second time in which there has been mention of a solution around a circle. However, I don't think this makes a lot of sense, since I expect just one solution.

Samith: Unfortunately, I don't know p either.

--------------------

And it looks like I've made some mistakes in my simplification above. The full equation, if it's of any assistance, is:

H(x,p) = a * sqrt( b*|p|^2 + (x.p)^2 + c^2 ) - c = 0

where a,b,c are all constant.

Thanks again.

If you only impose one condition on a pair of numbers, you will typically get a whole curve of solutions.

How about you work it out in a particular example and then we can easily see what the solutions look like? It would also help if the problem would stop mutating. As mooserman352 said, post the original problem.

Disregarding the aesthetical problem that your equation depends on the choice of scale, you'll still get a conic, which is probably easier to handle geometrically than analytically. With p=ux+vx⊥ and |x|=w, you get

(c/a)^2 = bw^2(u^2 + v^2) + u^2w^4 + c^2

which is clearly an equation of a conic with axes alongside x and x⊥, the actual type depending on the relationship between |a| and 1 as well as -b and x.x.