Consider a point with rectangular coordinates (x,y).

If x<0 then the polar coordinates of the point are (r,θ) where r≥0 and −π/2≤θ<3π/2and:

r=

θ=

If x≥0 then the polar coordinates of the point are (r,θ) where r≥0 and −π/2≤θ<3π/2 and:

r=

θ=
For both r is r=sqrt(x^2+y^2) I'm sure what the angle would be.

I'm not sure about the angle

Your answers should be expressions in terms of x and y)

x<0 means QII,QIII so π/2≤θ<3π/2

x>0 means QI, QIV, so -π/2≤θ<π/2
In any case, tanθ = y/x unless x=0

The second ones theta is tan(theta) =y/x

But the first one is different

To determine the polar coordinates (r, θ) of a point with rectangular coordinates (x, y), you can follow these steps:

Step 1: Calculate the value of r.
The distance between the origin and the point can be found using the formula r = sqrt(x^2 + y^2), where r represents the distance from the origin to the point.

Step 2: Determine the value of θ.

If x < 0:
In this case, the point lies in the left half-plane of the Cartesian coordinate system. To find the angle θ, you can use the atan2 function, which is available in most programming languages. atan2(y, x) returns the angle between the positive x-axis and the vector from the origin to the given point (x, y). However, to ensure the angle θ lies within the range of −π/2 ≤ θ < 3π/2, you can add 2π (or 360°) if the resulting angle from atan2 is negative:

θ = atan2(y, x) + (2π if atan2(y, x) < 0)

If x ≥ 0:
In this case, the point lies in the right half-plane (including the positive y-axis) of the Cartesian coordinate system. To find the angle θ, you can again use the atan2 function as stated above:

θ = atan2(y, x)

Now, to answer your specific question:

If x < 0:
- Calculate r using the formula r = sqrt(x^2 + y^2)
- Calculate θ using θ = atan2(y, x) + (2π if atan2(y, x) < 0)

If x ≥ 0:
- Calculate r using the formula r = sqrt(x^2 + y^2)
- Calculate θ using θ = atan2(y, x)

It's important to note that the value of θ may be given in radians or degrees, depending on the context.