Solve Trig Equation: d1 Sinθ/Cos²θ = -d2 Sin(θ+ϕ)/Cos²(θ+ϕ)

  • Thread starter Thread starter Mikey-D
  • Start date Start date
  • Tags Tags
    Trig
Mikey-D
Messages
11
Reaction score
0
First off, this isn't a homework question. I need a solution to the following in terms of \theta. I don't have access to any math software, it's been a number of years since I've done any serious trig, and when I try to solve it on paper it turns into a cluster**** of confusion. If anyone can drop this into maple or something and grab me a solution, I'd be eternally grateful...

<br /> \frac{d_1 Sin\theta}{Cos^2\theta} = - \frac{d_2 Sin(\theta+\phi)}{Cos^2 (\theta+\phi)}<br />

Thanks!
 
Mathematics news on Phys.org
Mikey-D said:
I need a solution to the following in terms of \theta

Can you be clearer? This statement of the question is ambiguous. A solution for what? d1? d2? phi?

Or are you looking for a solution for theta in terms of d1, d2 and phi?
 
stevenb said:
Can you be clearer? This statement of the question is ambiguous. A solution for what? d1? d2? phi?

Or are you looking for a solution for theta in terms of d1, d2 and phi?

The latter, sorry. I misspoke (mistyped?). :P

\theta = ??
 
Mikey-D said:
The latter, sorry. I misspoke (mistyped?). :P

\theta = ??

That's what I figured, but I just wanted to be sure.

That looks difficult to solve. There may be a way, but I don't see it offhand.

By any chance, can you argue that your equation is relevant only for small theta? If so, you can do what is called a small angle approximation. In this case you would substitute as follows.

\cos \theta \approx 1

\sin \theta \approx \theta

You would first use some trig identities to separate theta and phi from the sine and cosine. I think you would end up with a quadratic equation for theta (again assuming theta is small). If this sounds interesting and gives you any trouble, I could elaborate further, but I didn't want to do this unless you can clearly use prior knowledge that theta is small.
 
unfortunately, no. The ranges of both angles (theta and phi) can be large. It gets pretty ugly pretty fast. What I'm looking for is a minimum of the function

<br /> f = \frac{d_1}{Cos(\theta)} + \frac{d_2}{Cos(\theta+\phi)}<br />
 
Mathematica offers up 6 solutions, unfortunately they are all too long to fit in the space allotted here (limit 20k characters). Not sure that they are that helpful anyway :-)

Numerical solutions should be well behaved in the concave region between spikes to infinity if you cannot make any simplifications or approximations.
 
SEngstrom said:
Mathematica offers up 6 solutions, unfortunately they are all too long to fit in the space allotted here (limit 20k characters). Not sure that they are that helpful anyway :-)

Numerical solutions should be well behaved in the concave region between spikes to infinity if you cannot make any simplifications or approximations.

damn. Was afraid that might happen.

Allow me to explain my situation, and maybe someone has a suggestion then...

I've two lines (l1 and l2), and a point in between them (p). I'm looking for the shortest line segment, through p, which connects l1 and l2. This shouldn't be difficult...I must be missing something obvious here...

EDIT: in the above function, d_1 and d_2 are the distances from p to l1 and l2, respectively. theta is the angle between the desired line segment and l1, and phi is the difference between the angles of l1 and l2.
 
I formulated the problem as follows: two lines y=k1*x+b1, y=k2*x+b2
A line through a specified point (xp,yp): y=kp(x-xp)+yp
Finding the solutions (xp1,yp1) and (xp2,yp2) defined by the intersections of each of the two first equations and the third allows you to specify d2=(yp2-yp1)^2+(xp2-xp1)^2 which when minimized yields a minimum for kp at:
\frac{\text{b1} \text{k2}-\text{b2} \text{k1}+\text{yp}<br /> (\text{k1}-\text{k2})}{\text{b1}-\text{b2}+\text{k1}<br /> \text{xp}-\text{k2} \text{xp}}

ps there are more solutions some of which again stretch over pages - might be worth see what this approach does for you though.
 
a purely geometric solution may be the best option - consider the three lines forming the sides of a triangle and minimize the length of the side opposing the known angle...
 
  • #10
Alternate method. You have two segments, one from l1 to p one and from p to l2. If those segments have the same slope they are on the same line. So (y1-yp)/(x1-xp)=(yp-y2)/(xp-x2). But those denominators that might be zero. Cross multiply. So (y1-yp)(xp-x2)=(xp-y2)(x1-xp). y1=y1start+k1*y1delta, x1=x1start+k1*x1delta, y2=, x2=. Solve for k1 and k2. Mathematica Reduce gives a solution that is less than half the size of the trig solution and looks like it has nothing more than quadratics and it has many special cases that I expect you can discard as being not relevant to your problem.

Simplify[Reduce[(y1s+k1*y1d-yp)(xp-(x2s+k2*x2d))==(yp-(y2s+k2*y2d))(x1s+k1*x1d-xp), {k1,k2}]]
 
Last edited:
Back
Top