Taking 2 classes concurrently and need to drop one. In danger of two W's?

I am taking physics and mathematics concurrently, and found out I’m not doing well in math. I decided it would be best if I dropped math with a W, and keep taking physics. I logged into my portal, and found out if I do drop math, my physics would also need to be dropped because my current math class is a prerequisite to the physics class. I’m doing well in physics, and having two W’s is not what I want, but if no other option is there, it is what it is. So what should I do? Should I stay in both classes and let myself get a D in math for the A in physics? Is there a work around for this situation? Thanks in advance.