Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
hi,
i've never used symbolics before and i'm having a bit of trouble. i attached the worksheet in question. i'm trying to solve for v1 and v2. however, u1 and u2 are also coming out of the Find function. i think i'm missing something.
thanks,
anthony
There appears to be nothing wrong.
You supply 2 equations, and want two variables solved. That matches.
Mathcad gives you two possible solutions, one where v1 equals u1 and v2 equals u2, the other where v1 and v2 depend on u1, u2, m1 and m2.
You can also do:
Success!
Luc
thanks luc,
is there a way to tell it to ignore when u1=v1 and u2=v2
I guess you will have to select the desired column manually (but you shouldn't use copy & paste):
thanks guys,
that was helpful. i understand now.
just in case it helps someone else, i attached an updated version. this takes into account what you both mentioned. it will work for any values of mass entered. i hadn't thought about if m1 = m2. i was confused by the mathcad output. but it's starting to make a little more sense. i'm not really clear on the output, since it's the first time i have tried something like this. also, i forgot to mention that i got the equations from here:
https://en.wikipedia.org/wiki/Elastic_collision
the first time i tried this, i just used the equations directly. but i was curious to see if i could get mathcad to do the derivation. oh one other thing. i just found a square wave and triangle wave example in the mathcad help. so after all that in the other threads, i bump into it in the help.
Edit; Updated the attachment, based on posts below
If m1=m2 you still can use the second column solution!!
In that case you automatically get v1=u2 and v2=u1 as it should be!
The "solution" v1=u1 and v2=u2 would mean that each body would continue with the same velocity as before!?
if m1=m2 then v1=v2. so that's the trivial case, they call it. i was assuming mathcad broke it out for a reason. if the second column works for all cases, then i'm really confused by the mathcad output. at first i wasn't sure what was going on. then luc pointed out the trivial case and said that is why mathcad put it there. so i'm really not sure. originally, i was trying to get the second column only. but that doesn't seem possible. then i literally copy and pasted the matrix output, but wanted a better solution. i came up with pulling the positions. now i'm using the if statement. i think there are a lot of things that are possible. but my ignorance with mathcad is a problem.
I dont understand why you are confused that Mathcad gives you two pairs of solutions.
You have a linear equation in v1 and v2 and a quadratic one. So (mathematically) you should expect two solutions!
You may give it a try and solve the system yourself manually. solve the linear equation for, lets say v2 and substitute v2 for this result in the second equation. This gives you a quadratic equation for v1 and you should not be surprised that there are two solutions 🙂
It doesn't necessarily mean that ever math result also has a meaningful meaning from a physical or technical point of view.
But in your case there may also be an explanation for the unwanted solution.
When two bodies move with velocities v1 and v2 in an ideal environment and you look at the situation at a later time, two scenarios are possible:
1) the bodies have not collided and still have their initial velocity -> u1=v1, u2=v2. Thats the first column of Mathcads solutiuon
2) the bodies collided. Then the second column of Mathcads solution applies (and if they have equal mass, they simply exchanged their velocity)
Momentum and kinetic energy are conserved in both situations and so the two equations are fulfilled in both cases.
What you if-statement meant was that if the two masses were the same, you assume that the bodies don't collide at all. Not what you intended
thanks werner,
i didn't check the if statement. i ran it again compared to the previous method and it was pulling the wrong numbers when the mass was equal. i reverted back to the previous method i used. i updated my previous post to contain the updated file.
i'm not a mathematician. i was confused because i wanted to see if mathcad could come up with the equations. it sort of did. however, the first column is meaningless. so that was the confusion. i guess you are saying mathematically it needs to be there. you are also saying it applies to pre-collision. it's confusing to me. but it's not a big deal. before i tried this, i just used the actual equations that you would derive by hand. so it's actually a lot easier to not use mathcad, lol. oh well. i appreciate your and luc's help though. it does help.
The first column solution of Mathcad is NOT meaningless. Neither from a mathematics nor from a physics point of view. As I wrote before, its the solutions which correspond to the situation that the bodies did not collide. From the two equations alone you can't decide if a collision has happened or not. The equations only deal with mass and velocity only and there is no information contained about position and direction. So from the two equations alone it cannot be decided, if the bodies collide or not.
If they don't collide, the first solution applies, if they collide, the second solution applies - we need both even from an engineering point of view.
Its YOU who assumes, that a collision should have happened and therefore are only interested in the second solution. No software could read your mind and know that 😉
And if you manually calculate, you also should have arrived at two solutions! You simply threw out one of them (maybe without even noticing) because it did not apply to the case you had in mind.
Mathcad explicitely points you to both solutions and forced you to think about their physical meaning - thats a good thing IMHO.