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










share|cite|improve this question
























  • 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















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










share|cite|improve this question
























  • 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













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










share|cite|improve this question















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






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








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


















  • 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















active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

QoS: MAC-Priority for clients behind a repeater

Ивакино (Тотемский район)

Can't locate Autom4te/ChannelDefs.pm in @INC (when it definitely is there)