#how can you calculate the number of times a cosine function equals 0 on some interval [0, T]
88 messages · Page 1 of 1 (latest)
I know that it will be zero everytime the parameter of the cosine function equals $\frac{(2n+1)\pi}{2}$, but the set n makes it difficult to calculate
£ ςΓσΔηκεΓζ
the set n is of course limited by the interval [0, T], but im not sure how this would work
You can maybe try to find all integers $n$ that satisfy $0 \leq \frac{\pi(2n+1)}{2} \leq T$.
Crystopher
how would you do that mathematically
You can divide it into two inequalities, so solve both $0 \leq \frac{\pi(2n+1)}{2}$ and $ \frac{\pi(2n+1)}{2} \leq T$. The first one would give you a lower bound, the latter gives you an upper bound for $n$
Crystopher
lets say we have $x'(t) = Awcos(w(t+c))$ such that $w(t+c) = \frac{\pi(2n+1)}{2}$ oddly solving for n worked in some cases but for every possible combination
£ ςΓσΔηκεΓζ
is this due to the bounds?
also how do we deal with a lower bound not being a positive integer value?
would the lower bound just be 0 then?
also T isn't necessarily an integer
so solving for the upper bound doesn't necessarily yield integer division
we would find when pi(2n+1)/2 = 0 and when it = T
from there we would take the ceil of n for when the period = 0 and take the floor for n when the period = T
taking the ceil and floor is essentially saying that we are tryna ignore the zeros outside the interval
nah this is hieroglyphics to me 😭 idk what awcos is
$$x'(t) = \frac{\partial }{\partial t}(\frac{L}{2}sin\left(\frac{\pi v_o t}{L} + sin^{-1}\left(\frac{2x_o}{L}\right)\right))$$
£ ςΓσΔηκεΓζ
basically just treat all the other variables as constants
L > 0, -L/2 <= x_0 <= L/2, and v_0 has no limits other than that it's real
you could simplify it as $$x'(t) = \frac{\partial }{\partial t}(\frac{L}{2}sin\left(\frac{\pi v_o(t+c)}{L}\right))$$, where c is the phase-shift constant
£ ςΓσΔηκεΓζ
would this then require a piecewise function?
=> $$x'(t) = \frac{\pi v_0}{2}cos\left(\frac{\pi v_o(t+c)}{L}\right)$$
£ ςΓσΔηκεΓζ
i have a c in precalc
oh...
wait why is x the output
well x(t) is just a position function
so I'm trying to minimize it w/ x'(t)
yea the partial derivative
wait so do you want the # of zeros or the position of all the zeros
number of zeros of x'(t)
in the interval right
A and w are constants ?
essentially
ok
so we basically set the variables in the beginning, but then only change t
and pi(2n+1)/2 is the period ?
sorry for asking so many questions
so everything except for t is just an initial condition
every time that w(t + c) = pi(2n+1)/2 is true is when x'(t) = 0
floor((2T/pi - 1)/2) + 1
that should give # of zeros i think
pretty sure that only works under the assumption c = 0
bro what is c 😭
phase-shift constant I calculated lmao
ohhhhhhhhh
basically allows for the initial position to be true
bro at this point id just ask chatgpt
I've tried solving this for way too long
like everything I try only like partially works
wait does the phase shift make it oscilate more or just moves it left or right
left/right
wait so if im getting this right a positive c makes it move left right
yea until x(0) = x_0
we can put into thee equation to get the number of zeros
to which equation?
for the derivative
if pi(2n+1)/2 is where the zeros will be when c = 0
show me what u mean
ok am artist
this is your equation shifted to the left by c
but if we also shift the interval to the left by c
we pretty much have the same equation
so now we have to find n at -c
and n at T - c
lets just say that N(x) = n at position x
so now if N(-c) is an integer, that means that it is a zero at -c so we want to count the number of zeros between those 2 points not including at -c
we do floor(N(T - c)) - N(-c)
but if N(-c) is not an integer, then there is not a zero at -c so we want to count the number of zeros between those 2 points including the ceil of N(-c) as that will give the rightmost zero to -c
floor(N(T - c)) - ceil(N(-c)) + 1
using this means you have a minimum number of bounces of 1, but that isn't true
and im trying to avoid a piecewise function
yea dont worry about it, its a really weird fucking problem
especially to get a solution that works 100% of the time
I probably need to reapproach everything
gpt just gave me a solution close to one I came up with but with slight changes