solving t when $t=frac{2*x_{dist}}{v_0*(1+(1-frac{a_{drag%}}{100})^t)}$
up vote
0
down vote
favorite
I'm trying to make a function for the time a projectile is traveling over a certain distance, but while trying to solve t I noticed that t is both a power and a base, so use of logarithms would be basically useless. In the case of: $$t=frac{x_{dist}*cosθ}{frac{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}{2}}$$ I went to the form: $$t=frac{2*x_{dist}*cosθ}{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}$$ Which can then be simplified to being: $$t=frac{2*x_{dist}}{v_0*(1+(1-frac{a_{drag%}}{100})^t)}$$ But even after doing these simplifications of the formula you keep the base t and power t, which can't be solved using common logarithmic operations. I tried applying a lot of them as well as looking for other solutions like infinite powers but none seem to get me to a function where t isn't required to calculate itself. Which leads me to think that using limits is the way to solve this equation, because from programming experience I know that repeating this calculation over and over will in the end converge to a certain value
since there is a time this object takes to travel to the destination.
If you are wondering how I made this equation, its made to function within a game to predict the arc of a projectile as accurate as possible. Since the games physics are different from real life (like drag being a percentage of speed per second) I ended up with this formula. In the end I would want to know the angle to shoot at, but that isn't relevant for this question since I could simplify the equation to not involve the angle anymore.
So now the real question:
How would I, given this formula, make a function for t and thus get rid of the power in $(1-frac{a_{drag%}}{100})^t$?
I ploted the graph in desmos to verify that it actually converged and got the following results
calculus multivariable-calculus
add a comment |
up vote
0
down vote
favorite
I'm trying to make a function for the time a projectile is traveling over a certain distance, but while trying to solve t I noticed that t is both a power and a base, so use of logarithms would be basically useless. In the case of: $$t=frac{x_{dist}*cosθ}{frac{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}{2}}$$ I went to the form: $$t=frac{2*x_{dist}*cosθ}{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}$$ Which can then be simplified to being: $$t=frac{2*x_{dist}}{v_0*(1+(1-frac{a_{drag%}}{100})^t)}$$ But even after doing these simplifications of the formula you keep the base t and power t, which can't be solved using common logarithmic operations. I tried applying a lot of them as well as looking for other solutions like infinite powers but none seem to get me to a function where t isn't required to calculate itself. Which leads me to think that using limits is the way to solve this equation, because from programming experience I know that repeating this calculation over and over will in the end converge to a certain value
since there is a time this object takes to travel to the destination.
If you are wondering how I made this equation, its made to function within a game to predict the arc of a projectile as accurate as possible. Since the games physics are different from real life (like drag being a percentage of speed per second) I ended up with this formula. In the end I would want to know the angle to shoot at, but that isn't relevant for this question since I could simplify the equation to not involve the angle anymore.
So now the real question:
How would I, given this formula, make a function for t and thus get rid of the power in $(1-frac{a_{drag%}}{100})^t$?
I ploted the graph in desmos to verify that it actually converged and got the following results
calculus multivariable-calculus
You can use Taylor expansion to solve this equation as accurately as you want. I suppose that for a game it will be enough to expand the power to the second or third term
– Mikalai Parshutsich
Nov 18 at 14:42
That's one way of doing it, but I as a (beginning) programmer prefer a more elegant solution. If it's impossible or really hard to solve for t I'll most likely stick to this option though since it's the second best substitute for just getting the right equation.
– Timo Post
Nov 18 at 19:05
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to make a function for the time a projectile is traveling over a certain distance, but while trying to solve t I noticed that t is both a power and a base, so use of logarithms would be basically useless. In the case of: $$t=frac{x_{dist}*cosθ}{frac{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}{2}}$$ I went to the form: $$t=frac{2*x_{dist}*cosθ}{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}$$ Which can then be simplified to being: $$t=frac{2*x_{dist}}{v_0*(1+(1-frac{a_{drag%}}{100})^t)}$$ But even after doing these simplifications of the formula you keep the base t and power t, which can't be solved using common logarithmic operations. I tried applying a lot of them as well as looking for other solutions like infinite powers but none seem to get me to a function where t isn't required to calculate itself. Which leads me to think that using limits is the way to solve this equation, because from programming experience I know that repeating this calculation over and over will in the end converge to a certain value
since there is a time this object takes to travel to the destination.
If you are wondering how I made this equation, its made to function within a game to predict the arc of a projectile as accurate as possible. Since the games physics are different from real life (like drag being a percentage of speed per second) I ended up with this formula. In the end I would want to know the angle to shoot at, but that isn't relevant for this question since I could simplify the equation to not involve the angle anymore.
So now the real question:
How would I, given this formula, make a function for t and thus get rid of the power in $(1-frac{a_{drag%}}{100})^t$?
I ploted the graph in desmos to verify that it actually converged and got the following results
calculus multivariable-calculus
I'm trying to make a function for the time a projectile is traveling over a certain distance, but while trying to solve t I noticed that t is both a power and a base, so use of logarithms would be basically useless. In the case of: $$t=frac{x_{dist}*cosθ}{frac{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}{2}}$$ I went to the form: $$t=frac{2*x_{dist}*cosθ}{v_0*cosθ+v_0*cosθ*(1-frac{a_{drag%}}{100})^t}$$ Which can then be simplified to being: $$t=frac{2*x_{dist}}{v_0*(1+(1-frac{a_{drag%}}{100})^t)}$$ But even after doing these simplifications of the formula you keep the base t and power t, which can't be solved using common logarithmic operations. I tried applying a lot of them as well as looking for other solutions like infinite powers but none seem to get me to a function where t isn't required to calculate itself. Which leads me to think that using limits is the way to solve this equation, because from programming experience I know that repeating this calculation over and over will in the end converge to a certain value
since there is a time this object takes to travel to the destination.
If you are wondering how I made this equation, its made to function within a game to predict the arc of a projectile as accurate as possible. Since the games physics are different from real life (like drag being a percentage of speed per second) I ended up with this formula. In the end I would want to know the angle to shoot at, but that isn't relevant for this question since I could simplify the equation to not involve the angle anymore.
So now the real question:
How would I, given this formula, make a function for t and thus get rid of the power in $(1-frac{a_{drag%}}{100})^t$?
I ploted the graph in desmos to verify that it actually converged and got the following results
calculus multivariable-calculus
calculus multivariable-calculus
edited Nov 18 at 10:15
asked Nov 18 at 9:56
Timo Post
11
11
You can use Taylor expansion to solve this equation as accurately as you want. I suppose that for a game it will be enough to expand the power to the second or third term
– Mikalai Parshutsich
Nov 18 at 14:42
That's one way of doing it, but I as a (beginning) programmer prefer a more elegant solution. If it's impossible or really hard to solve for t I'll most likely stick to this option though since it's the second best substitute for just getting the right equation.
– Timo Post
Nov 18 at 19:05
add a comment |
You can use Taylor expansion to solve this equation as accurately as you want. I suppose that for a game it will be enough to expand the power to the second or third term
– Mikalai Parshutsich
Nov 18 at 14:42
That's one way of doing it, but I as a (beginning) programmer prefer a more elegant solution. If it's impossible or really hard to solve for t I'll most likely stick to this option though since it's the second best substitute for just getting the right equation.
– Timo Post
Nov 18 at 19:05
You can use Taylor expansion to solve this equation as accurately as you want. I suppose that for a game it will be enough to expand the power to the second or third term
– Mikalai Parshutsich
Nov 18 at 14:42
You can use Taylor expansion to solve this equation as accurately as you want. I suppose that for a game it will be enough to expand the power to the second or third term
– Mikalai Parshutsich
Nov 18 at 14:42
That's one way of doing it, but I as a (beginning) programmer prefer a more elegant solution. If it's impossible or really hard to solve for t I'll most likely stick to this option though since it's the second best substitute for just getting the right equation.
– Timo Post
Nov 18 at 19:05
That's one way of doing it, but I as a (beginning) programmer prefer a more elegant solution. If it's impossible or really hard to solve for t I'll most likely stick to this option though since it's the second best substitute for just getting the right equation.
– Timo Post
Nov 18 at 19:05
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3003332%2fsolving-t-when-t-frac2x-distv-011-fraca-drag-100t%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can use Taylor expansion to solve this equation as accurately as you want. I suppose that for a game it will be enough to expand the power to the second or third term
– Mikalai Parshutsich
Nov 18 at 14:42
That's one way of doing it, but I as a (beginning) programmer prefer a more elegant solution. If it's impossible or really hard to solve for t I'll most likely stick to this option though since it's the second best substitute for just getting the right equation.
– Timo Post
Nov 18 at 19:05