#Simple physics task

249 messages · Page 1 of 1 (latest)

frosty nest
#

A bullet is shot with initial velocity v0 = 5.3 m/s towards a target located at a horizontal distance x = 2.1 m and a vertical distance y = 0.21 m from the target. See the figure below.

What must the launch angle α be for the bullet to hit the target center?

#

i got 22.5 degrees but its surely wrong since i didnt take into account the horizontal speed component and only used 2as = v^2-v_o^2 for horizontal

distant berry
#

wait

frosty nest
#

ok

distant berry
#

okay so

#

vertical component = v sin α
horizontal component = v cos α

frosty nest
#

yes

distant berry
#

now eq 1->>>>

  • y = v sin α (T) - 1/2 g(T^2)
frosty nest
#

why -y?

#

we start .21 m above ground

#

why not +y

distant berry
#
  • y
#

cause we took acc negative in down direction

frosty nest
#

ok continue

distant berry
#

and when the object will hit the target it will be Y m down in negative y axis

#

ya

#

u shuld get it ig

frosty nest
#

i tried solving the simultaneous equation but it has no solution in wolfram

distant berry
#

let me try

#

hmm difficult to solve

frosty nest
#

yea

#

we were supposed to use python to solve this

#

fsolve or something, i tried by hand

distant berry
#

oh

#

i mean u do understand the equations now

#

so ya try to program smthg idk

frosty nest
#

but the equation is unsolvable

#

cos(x)5.3t-2.1 = 0 and -1/29.81t^2 + sin(x)5.3t+2.1 = 0

#

there is * lost in between the numbers

distant berry
frosty nest
#
cos(x)*5.3*t-2.1 = 0 and -1/2*9.81*t^2 + sin(x)*5.3*t+2.1 = 0
#

i think im screwed

#

i could have sworn i have done so many of these and none of them were this difficult. isnt this a simple problem? can i even verify if 22.5 is correct? i tried putting that angle in and it seems to be wrong if my verification method is right

distant berry
#

ic

#

is there air resistance 😂 ?

frosty nest
#

nope

#

man i shouldnt be struggling with elementary physics, im in uni ffs

glossy radish
# frosty nest A bullet is shot with initial velocity v0 = 5.3 m/s towards a target located at ...

Let the initial height be h and the needed distance be l. Then the equations of motion are:
x(t) = v0 cos(α)t
y(t) = h + v0 sin(α)t - (1/2)gt^2
First, let's find the time of flight T.
We know that at the end x(T) = l. So:
x(T) = v0 cos(α)T = l
T = l/(v0 cos(α))
Now, let's substitute that into y(t).
y(T) = h + v0 sin(α)l/(v0 cos(α)) - (1/2)gl^2/(v0 cos(α))^2 = h + tan(α)l - (1/2)gl^2/(v0 cos(α))^2
As this is the landing point, we must have y(T) = 0. So:
h + tan(α)l - (1/2)gl^2/(v0 cos(α))^2 = 0
Let k = tan(α), then 1/cos(α)^2 = 1 + k^2. So:
h + lk - (1/2)(gl^2/v0^2)(1 + k^2) = 0
k^2 - 2(v0^2/(gl))k + 1 - 2hv0^2/(gl^2) = 0
Let's find the discriminant first.
D = 4v0^4/(gl)^2 - 4 + 8h^2v0^4/(gl^2)^2 = 4(v0^4/(gl)^2)(1 + 8h^2/l^2) - 4
So:
k = v0^2/(gl) ± √((v0^2/(gl))^2 (1 + 8(h/l)^2) - 1)
That is the tangent of the angle. So:
α = arctan(v0^2/(gl) ± √((v0^2/(gl))^2 (1 + 8(h/l)^2) - 1))
In our case we have v0 = 5.3 m/s, h = 0.21 m, l = 2.1 m. So, we get the values:
α = arctan(v0^2/(gl) + √((v0^4/(gl)^2)(1 + 8(h/l)^2) - 1)) = arctan((5.3 m/s)^2/(9.81 m/s^2*2.1 m) + √(((5.3 m/s)^2/(9.81 m/s^2*2.1 m))^2 (1 + 8(0.21 m/(2.1 m))^2) - 1)) ≈ 67.1°
α = arctan(v0^2/(gl) - √((v0^4/(gl)^2)(1 + 8(h/l)^2) - 1)) = arctan((5.3 m/s)^2/(9.81 m/s^2*2.1 m) - √(((5.3 m/s)^2/(9.81 m/s^2*2.1 m))^2 (1 + 8(0.21 m/(2.1 m))^2) - 1)) ≈ 19.8°
So, the available angles are 67.1° and 19.8°, if I didn't mess up.

frosty nest
#

im checking your steps rn

#

you did exactly what i did

#

but i got stuck here, since i couldnt simplify it further

#

Let k = tan(α), then 1/cos(α)^2 = 1 + k^2. So:

#

that is a hard substitution trick, well done

#

ill keep checking further

#

but it still seems impossible to find an answer

#

after we switch from tan to k this is what we get

#

-21.63k^2 + k*l + 2.1-21.63

#

which according to the discriminant would cause a negative under the square root

#

@glossy radish any thoughts?

glossy radish
frosty nest
#

its impossible to solve it

#

l is also positive

glossy radish
frosty nest
#

lemme take a screenshot

glossy radish
#

I think you forgot to multiply something by 2.

#

See, that's why I don't like to substitute constants before the very end.

frosty nest
#

why would i need to multiply with 2

#

OOOOOOOOOOOH

#

time taken for vertical time

frosty nest
#

it still doesnt seem to have a solution

#

i added in 2

#

still no solution

glossy radish
frosty nest
#

hmmm

frosty nest
glossy radish
frosty nest
glossy radish
#

Yeah, that's good. That leads to h + lk - (1/2)(gl^2/v0^2)(1 + k^2) = 0, which then leads to:
k^2 - 2(v0^2/(gl))k + 1 - 2hv0^2/(gl^2) = 0

frosty nest
#

where can i see the solution on wolfram? to make sure there arent any hand written errors

#

i assume this is radians

glossy radish
frosty nest
glossy radish
#

Though, actually...

#

Let me check.

#

Oh, no, it does.

#

For n = 1.

frosty nest
#

that would be 180 degrees

glossy radish
#

The first value is πn - 5.10316, the second is πn - 5.99208. Both make sense in our problem for n = 2. So, we get the values:
α = 2π - 5.10316 = (2 - 5.10316/π)*180° ≈ 67.6°
α = 2π - 5.99208 = (2 - 5.99208/π)*180° ≈ 16.7°
There seems to be some discrepancy with my answers. Maybe due to error? Who knows. Maybe I just messed up a bit.

frosty nest
#

any ideas why n should be 2

#

is n related to the quadrants?

glossy radish
frosty nest
#

oh

#

smart

glossy radish
frosty nest
glossy radish
#

Ah, ok.

frosty nest
#

lets see if i can solve it using fsolve

glossy radish
#

fsolve? What is that?

frosty nest
#

method for solving math equations in python

glossy radish
#

Oh, ok.

#

Well, no reason it shouldn't work, I guess.

#

It is a consistent system.

frosty nest
#

ye i guess, just making sure wolfram is not misinterpreting my intentions which it has many times before

#

it almost always assumes something even though i type in something that makes little to no mathematical sense, and provides an answer

jovial jungle
#

Projectile motion at its finest

glossy radish
#

Well, as I said, better to solve in variable form 😁

frosty nest
#

fsolve is not taking into account the trigonometric symmetry here

#

completely forgetting that there are two answers for each rotation

glossy radish
#

Well, to be fair, there are infinitely many solutions.

#

It just picked a point and found one closest to it.

frosty nest
glossy radish
frosty nest
#

there are infinite solutions if you talk about multiple of the same rotations

frosty nest
#

lemme try that

#

i dont even know why fsolve needs initial guess

glossy radish
#

A computer can't list infinitely many items.

frosty nest
#

i tried having an initial guess of 16.7 so that the next solution is closer to it, but i get something much bigger

glossy radish
frosty nest
#

sorry for that

#

my bad

glossy radish
#

No problem! Take your time, I'm also interested if it will work.

frosty nest
glossy radish
#

Great!

frosty nest
#

its funny how it refused to work for 50 but worked for 60

glossy radish
frosty nest
#

its weird sometimes

#

here it wants to say 376

#

for 60 it wants to say 67.1

#

i dont see the pattern

glossy radish
#

Hm. Perhaps some numerical stuff going wrong? Or maybe the method that it uses is ill-posed for functions with a lot of discontinuities.

#

If it uses Newton's method, then don't look for a pattern. The dependence of the root you get on the initial condition is chaotic.

frosty nest
glossy radish
#

So, the pattern exists, but it may be infinitely complex in some regions.

#

Look up Newton's basins for more info on that.

glossy radish
#

Ah, there we go.

#

Then this behavior is understandable.

frosty nest
#

i want to see why it seems so chaotic

#

didnt it have to do with tangents?

glossy radish
#

I recommend 3Blue1Brown's video on it.

frosty nest
#

i went on a spiritual journey with that video 😅, i remember a lot now

glossy radish
#

Cool!

frosty nest
#

this is the definition of unstable

#

earlier it said 67.1 for 60

#

now it says 955.63 for 60

glossy radish
#

Hm. I think it's better to switch from Newton-Rhaphson to somthing simpler, like dichotomy.

#

That shouldn't fail.

frosty nest
#

alright

glossy radish
#

And, as I said, it's probably better to solve the algebraic equation in k first.

#

Polynomial, even.

#

Polynomials don't have discontinuities.

frosty nest
#

but we have to solve it using python

#

without simplifications i assume

glossy radish
frosty nest
glossy radish
#

If you're worried about the precision, find k to 5-6 decimal places.

#

That is way more than enough.

frosty nest
#

alright ill just switch to k

glossy radish
#

Oh, well, alright...
Then, maybe there's a way to constrict the region in which it looks for solutions?

frosty nest
#

dichotomy method

#

if chat gpt can be trusted

#

i think its in radians

glossy radish
#

Which initial values did you pick?

#

-10 and 10? That isn't good.

frosty nest
glossy radish
#

Our region is (-π/2, π/2), so take the values to be, say, -π/2 + 0.0001 and π/2 - 0.0001.

frosty nest
#

i was just testing if it would spit random nonsense

glossy radish
frosty nest
glossy radish
#

Try -3.14 and 3.14.

#

Oh, wait, no.

#

-1.57 and 1.57.

frosty nest
#

weird

glossy radish
# frosty nest

Don't take the exact angles. tan(x) is undefined, it will cause problems.

#

Again, try -1.57 and 1.57.

glossy radish
#

Let me try, too.

frosty nest
glossy radish
#

Oh, alright. That's good.

frosty nest
#

now if i restrict it from 60 to 89 degrees

glossy radish
#

Now, try 0.3 and 1.57.

frosty nest
#

well done

glossy radish
#

Alright, great!

#

Then I won't do it. Too lazy for Scilab/Excel 😄

frosty nest
#

i see you chose .3 because of 17 degrees

#

smart

#

and 1.57 so that its not exactly 90

#

so many small details to remember

#

its been a while since i studied trig

glossy radish
frosty nest
#

ye

glossy radish
#

Actually, you know what?

#

I shouldn't be lazy.

#

Give me 10-15 minutes, I'll cook it up in Scilab.

#

At least so I don't get too rusty.

frosty nest
#

must practice once in a while

frosty nest
glossy radish
frosty nest
glossy radish
#

First root:

b=1.57;
D=0.00001;
d=b-a;
while d > D do
    c=(a+b)/2;
    fa=0.21+tan(a)*2.1-(1/2)*9.81*2.1^2/(5.3*cos(a))^2;
    fb=0.21+tan(b)*2.1-(1/2)*9.81*2.1^2/(5.3*cos(b))^2;
    fc=0.21+tan(c)*2.1-(1/2)*9.81*2.1^2/(5.3*cos(c))^2;
    if sign(fa*fc) < 0 then
        b=c;
    else a=c;
    end;
    d=b-a;
end;
c=c*180/%pi;
disp(c)

Second:

b=1.57;
D=0.00001;
d=b-a;
while d > D do
    c=(a+b)/2;
    fa=0.21+tan(a)*2.1-(1/2)*9.81*2.1^2/(5.3*cos(a))^2;
    fb=0.21+tan(b)*2.1-(1/2)*9.81*2.1^2/(5.3*cos(b))^2;
    fc=0.21+tan(c)*2.1-(1/2)*9.81*2.1^2/(5.3*cos(c))^2;
    if sign(fa*fc) < 0 then
        b=c;
    else a=c;
    end;
    d=b-a;
end;
c=c*180/%pi;
disp(c)
frosty nest
#

Nice

glossy radish
#

Well, glad I remember some stuff, at least 😄

#

My coding skills are quite minimal.

frosty nest
#

its easy to forget unless you warm up once in a while

#

it feels like that when i comeback from a break each semester

#

but once you type the first few words onto your computer it then doesnt feel as heavy as it did a second ago

#

same thing with math problems tbh

glossy radish
#

Well, thankfully, I also used Scilab for my report for the student conference in May of 2022. And several times after that (including, I believe, a week ago).

frosty nest
#

is Scilab like matlab?

#

it seems like it

glossy radish
#

Kind of.

#

Except Scilab doesn't require you to sell three kidneys to use 😄

frosty nest
#

so true

#

our university ditched matlab and replaced it with python

glossy radish
#

Well, our IT lessons weren't very informative. Just for the sake of them being there, I guess.
We mostly just worked in Excel or Scilab, as well as some stuff in draw io (which, surprisingly, turned out to be useful to make some pictures for chemistry labs, for example), as well as some other graphic stuff which I can't care to remember.

#

What kinda saddened me is that the programs for some other students had labs on equation mode in MS Word, which I think would be 9000% more useful than most of the stuff we did.

#

But we didn't have it...

#

I mean, I don't need it, I can use it. But almost noone else can.

#

So, the only way they can nicely write formulas is by hand.

#

I mean, I don't expect LaTeX courses, but at least this would be good...

frosty nest
#

thats so sad, i write formulas the way i write them on discord haha

#

or i use latex if im in dire need to make it look good

glossy radish
#

I've made a ton of tables using that, as well as some homeworks.

#

I can show an example - a physical chemistry HW.

frosty nest
#

maybe its already provided with my education pack

frosty nest
glossy radish
frosty nest
#

thank you @glossy radish

toxic basinBOT
#

@frosty nest has given 1 rep to @glossy radish

glossy radish
#

You're welcome!

frosty nest
#

how do you close a thread?

#

+close