Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi all,
I've been working on a problem and to be perfectly honest I don't know if there is a symbolic solution or how to check whether it can be solved in all cases but in any case I know it can be solved numerically for at least the values given in the attached worksheet. Also I'm not sure how to turn this into a symbolic solution (though I have tried). Specifically I wanted to constrain the problem to work with 2D vectors since I'm not sure if the problem would be solvable with more complex vectors (perhaps it doesn't matter). I'd be interested on your thoughts on this. My linear algebra isn't all that strong.
It involves some simple 2D vectors:
a = l + c
b = r +c
and l and r are orthogonal such that l dot r = 0
I want to find c and hence l and r given a and b. On the face of it, it seems to be 3 equations with 3 unknowns but I don't know if the third equation "counts" in this regard.
Regards,
Dave
Solved! Go to Solution.
Had troubles adding a picture to thge above post.
So I worked further on the sheet and got some weird results using symbolic eval. See my comments in the attached sheet.
At least we can say that we have an infinite number of solutions (the system is, as I already stated, underdetermnined) we get by varying a variable in a specific range which depends on your vectors a and b. The symbolic closed solution is attached.
If you intend to apply it on more dimensions or more complex equations - good luck! 😉
I want to find c and hence l and r given a and b. On the face of it, it seems to be 3 equations with 3 unknowns but I don't know if the third equation "counts" in this regard.
Looking on the coordinates it rather seems to me that you have 5 equations and 6 unknowns.
The symbol processor finds no solution (simply type x --> after the solve block).
As you have more variables than equations you can add an additional constraint - try |c|=2 and you get another solution. But there seems to be a rather small range for your additonbal wishes: |c|=1 finds no solution, e.g.
The problem with symbolic solutions of vector equations is that the symbolics does not use guess values and therefore does not know anything about the dimension of the vectors used. So most of the time you are an the safe (but inconvenient) side if you rewrite your equations using the vector components or at least define the vector beforehand using symbolic elements (L:=stack(L1,L2), etc.)
Had troubles adding a picture to thge above post.
So I worked further on the sheet and got some weird results using symbolic eval. See my comments in the attached sheet.
At least we can say that we have an infinite number of solutions (the system is, as I already stated, underdetermnined) we get by varying a variable in a specific range which depends on your vectors a and b. The symbolic closed solution is attached.
If you intend to apply it on more dimensions or more complex equations - good luck! 😉
Werner,
many thanks for your help. I'm still looking through what you have done.
BTW, what is the significance of the statement in the solution "if _z is complex AND _z is complex"?
David Wooff wrote:
Werner,
many thanks for your help. I'm still looking through what you have done.
BTW, what is the significance of the statement in the solution "if _z is complex AND _z is complex"?
If Mathcads symbolics (= MuPad) encounters an expression wher it would need twice an arbitrary variable it would name it the same but would indicate twice the this variable is a complex or an integer, etc. Its silly and would be better either to use two different variable names or state only once the domain of the variable.
See this example.
It would make more sense to use _n1 and _n2 and then state that both are integers.