2
$\begingroup$

suppose I have an equations of the following with two unknowns $A$ and $\theta$

$A\sin(x+\theta)=D$

I have two points $(E,F) (G,H)$ how do I go about solving this equation analytically. I can solve this equation by using least squares where I just plugin a few numbers and solve it iteratively.

I was thinking about using trig identities and breaking it down to $A\sin(x)\cos(\theta)+Acos(x)\sin(\theta)=D$

But I am kind of stuck at that point. Using derivative to solve the equation doesn't help since the form of the equation is still $\cos(x+\theta)$

  • 0
    $x^2+y^2=A^2$. But it is optional. Once you have $\theta$, you can solve $A$ out of $x=A\cos\theta$ as well.2012-09-14

1 Answers 1

3

I give all credit to Raskolnikov

Given this equations: $A\sin(x+θ)=D$

and these two points: $(E,F),(G,H)$

So these are the set of equations: $A\sin(E+θ)=F, A\sin(G+θ)=H$

so first expand them: $A\sin(E)\cos(θ)+A\cos(E)\sin(θ)=F, A\sin(G)\cos(θ)+A\cos(G)\sin(θ)=H$

Then let $X=A\cos(θ), Y=A\sin(θ)$

so your equations are: $X\sin(E)+Y\cos(E)=F, X\sin(G)+Y\cos(G)=H$

now solve for $X$ and $Y$.

Now set: $A=X/\cos(θ)$

So that: $Y=X\sin(θ)/\cos(θ) = Y/X=\tan(θ)$

You solve for $\theta$,

You can substitute $\theta$ into one of the previous equation and solve for A.