Solving V in Equation: tanθ = v2 ± √v4 - g(gR2 - 2v2h) / gR

  • Thread starter Thread starter sciwizeh
  • Start date Start date
Click For Summary

Homework Help Overview

The discussion revolves around solving for the variable V in the equation tanθ = (v² ± √(v⁴ - g(gR² - 2v²h)))/gR, which is related to projectile motion and game mechanics.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants explore the possibility of rearranging the equation to isolate V, with references to the quadratic formula and its application. Some suggest comparing coefficients to convert the equation into a standard quadratic form.

Discussion Status

There is an ongoing exploration of different methods to simplify the equation and solve for V. Some participants have provided alternative forms of the equation and discussed the implications of using tangent versus secant in a computational context. No explicit consensus has been reached.

Contextual Notes

Participants note the importance of the equation's form for implementation in a computer algorithm, highlighting the need for clarity in the context of game development. There is also mention of a related thread that provides additional context to the problem.

sciwizeh
Messages
25
Reaction score
0
first not homework... i need to solve and equation for a certain variable so that i can incorporate it into a game. I need to solve for V in this equation: [tex] tan\theta=\frac{v^{2}\pm \sqrt{v^{4}-g(gR^{2}-2v^{2}h)}}{gR}[/tex]
is it even possible?
 
Physics news on Phys.org
Sure it's possible :smile:

Does this form remind you of anything?

Hint: If we have the quadratic [tex]ax^2+bx+c=0[/tex] then [tex]x=\frac{-b\pm \sqrt{b^2-4ac}}{2a}[/tex]

So this means you can compare all co-efficients, a,b,c and then convert back into the general quadratic form, then solve for v from there.
 
Sorry, I misread the diagram that you posted under the other thread. Usually one fixes the muzzle speed and changes the angle and I thought that was the case here too. For a fixed angle, the equation that gives the muzzle speed is

[tex]v=\sqrt{\frac{gR^{2}(tan\theta^{2}+1)}{2(Rtan\theta \pm h)}}[/tex]

Use the upper (+h) sign if the firing cannon is higher than the other one and -h if lower.

Let me know how it works.
 
Well kuruman, you spoiled the fun :-p

Not that it makes a difference, but it can be further simplified:

[tex]v=Rsec\theta \sqrt{\frac{g}{2(Rtan\theta\pm h)}}[/tex]

since [tex]tan^2\theta+1=sec^2\theta[/tex]
 
Sorry for spoiling the fun, Mentallic. This thread is a continuation of

https://www.physicsforums.com/showthread.php?t=334483

where I mistakenly posted the formula for the angle instead of the speed so I wanted to make amends.

Yes, the expression can be further simplified, but I think it does make a difference. The formula is intended for a computer algorithm in which the tangent function exists and will be easier to implement than the secant.
 
thanks for the help, I would not have thought to reverse the quadratic formula.

kuruman is correct, it is simpler to use tangent, for my application. thanks again.
 
kuruman said:
Sorry for spoiling the fun, Mentallic. This thread is a continuation of

https://www.physicsforums.com/showthread.php?t=334483

where I mistakenly posted the formula for the angle instead of the speed so I wanted to make amends.

Yes, the expression can be further simplified, but I think it does make a difference. The formula is intended for a computer algorithm in which the tangent function exists and will be easier to implement than the secant.
No problem :smile:
Aha I guess I didn't consider simplicity for a computer algorithm. Carry on.

sciwizeh said:
thanks for the help, I would not have thought to reverse the quadratic formula.

kuruman is correct, it is simpler to use tangent, for my application. thanks again.
Reversing the quadratic isn't the conventional way to solve this problem, but does make it much easier if you realize the pattern it created.

i.e. the usual way would be to go about it like this:

[tex]tan\theta=\frac{v^{2}\pm \sqrt{v^{4}-g(gR^{2}-2v^{2}h)}}{gR}[/tex]

[tex]gRtan\theta=v^{2}\pm \sqrt{v^{4}-g(gR^{2}-2v^{2}h)}[/tex]

[tex]gRtan\theta-v^2=\pm \sqrt{v^{4}-g(gR^{2}-2v^{2}h)}[/tex]

now square both sides, collect all terms with v on one side, factorize... etc.
 
[tex]-b=v^2[/tex]

[tex]4ac=g(gR^{2}-2v^{2}h)[/tex]

[tex]2a=gR[/tex]

[tex]c=\frac{g(gR^{2}-2v^{2}h)}{2gR}=\frac{gR^{2}-2v^{2}h}{2R}[/tex]

[tex]a(tan\theta)^2+b(tan\theta)+c=0[/tex]

[tex]\frac{gR(tan\theta)^2}{2}-v^2(tan\theta)+\frac{gR^{2}-2v^{2}h}{2R}=0[/tex]

Now, just solve for v :smile:
 

Similar threads

Replies
15
Views
2K
Replies
32
Views
3K
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
12
Views
3K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K