Author Topic: Calculus with Velocities and other stuff  (Read 6293 times)

0 Members and 1 Guest are viewing this topic.

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Calculus with Velocities and other stuff
« on: January 20, 2013, 03:58:59 pm »
So I have a system of equations:

Variables:

V(x) - x velocity
V(y) - y velocity
C(x) - x constant
C(y) - y constant
t - time
g - gravity constant
dx, dy, dt, dV(x), dV(y), etc. - you can guess what these are

Problem:

dV(x) = C(x)*V(x)^(2)*dt
dV(y) = (C(y)*V(x)^(2)+g)*dt
dt = dy/V(y) = dx/V(x)

solve for V(x) and V(y) in terms of x and y

What I've done so far:

dV(x) = C(x)*(dx^2/dt^2)*dt
dV(x) = C(x)*V(x)*dx
Vx^(-1)*dV(x) = C(x)*dx
Integrate both sides (c is assumed to be 0 here) to get
ln(abs(V(x))) = x*C(x)
e^(x*C(x)) = abs(V(x))

good so far, right?

I sub in e^(x*C(x)) for V(x) in the next equation

dV(y) = (C(y)*e^(2*x*C(x))+g)*dt
dV(y) = (C(y)*e^(2*x*C(x))+g)*(dy/V(y))
V(y)*dV(y) = (C(y)*e^(2*x*C(x))+g)*dy

Now I'm stuck because I don't know how to integrate this equation

Help, please!
I am Bach.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #1 on: January 20, 2013, 04:01:16 pm »
why do you go from V(x) to dx^2/dt^2 shouldn't it be dx/dt instead?
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #2 on: January 20, 2013, 04:02:14 pm »
V(x) is squared... Did I not put that in?
I am Bach.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #3 on: January 20, 2013, 04:06:44 pm »
V(x) is squared... Did I not put that in?
You did just I'm not paying attention.

One other note is that you go from abs(V(x)) to V(x). I'm not sure if that would be considered a safe assumption
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #4 on: January 20, 2013, 04:07:25 pm »
abs(V(x))^2 is the same as V(x)^2
I am Bach.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #5 on: January 20, 2013, 04:10:47 pm »
abs(V(x))^2 is the same as V(x)^2
Ok just how you wrote it up its not obvious thats your reasoning. It just says
e^(x*C(x)) = abs(V(x))

good so far, right?

I sub in e^(x*C(x)) for V(x) in the next equation
Is C(y) and C(x) constants or are they functions that can have different outputs depending on the x and y?
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #6 on: January 20, 2013, 04:12:19 pm »
They're constants... I should have called them c and k, but the way I used is the way the problem is stated
« Last Edit: January 20, 2013, 04:12:33 pm by pimathbrainiac »
I am Bach.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #7 on: January 20, 2013, 04:14:29 pm »
then you have a constant your integrating(relative to changes in y) so you have 1/2V(y)^2=y*(C(y)*e^(2*x*C(x))+g)
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #8 on: January 20, 2013, 04:16:13 pm »
But shouldn't there be something done to the X in the exponent?
I am Bach.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #9 on: January 20, 2013, 04:17:20 pm »
But shouldn't there be something done to the X in the exponent?
why? your integrating relative to dy not x. assuming x and y are independent then there should be nothing done to the x
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #10 on: January 20, 2013, 04:19:52 pm »
I know that is wrong though because when I plug numbers back in, I don't get the right result
I am Bach.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Calculus with Velocities and other stuff
« Reply #11 on: January 20, 2013, 04:24:25 pm »
I think the problem may be in your first integral, but I'm not sure where. Try plugging in the values from it back to the original equations and see if thats working
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y