Students in upper secondary education encounter difficulties in applying mathematics in physics. To improve our understanding of these difficulties, we examined symbol sense behavior of six grade 10 physics students solving algebraic physic problems. Our data confirmed that students did indeed struggle to apply algebra to physics, mainly because they lacked both sufficient symbol sense behavior and basic algebraic skills. They used ad hoc strategies instead of correct, systematic rule-based procedures involving insight. These ad hoc strategies included the cross-multiplication, the numbering, and the permutation strategy. They worked only for basic formulas containing few variables. In problems with more variables, students got stuck. The latter two strategies substitute numbers for variables. The permutation strategy randomly checks several permutations to guess which one is correct. The numbering strategy substitutes numbers to check algebraic manipulations. Our results indicate insufficient focus on conceptual understanding of algebra in some mathematics textbooks, leading to reliance on poorly understood ad hoc strategies. Effective teaching of algebraic skills should not focus on either basic algebraic skills or on symbol sense behavior. Instead, both aspects should be taught in an integrated manner. Our operationalization of symbol sense behavior turned out to be very useful for analysis. In contrast to earlier qualitative studies, it provided us the opportunity to measure symbol sense behavior quantitatively. This operationalization should also be applicable to other science subjects. Furthermore, we discussed some implications of our results for curricula, teachers, science teacher educators, and textbook publishers aiming at successful application of mathematics in physics.