1. Math is complex but useful.

2. Math is complicated but useful.
(Are both okay? Which syllable is stressed in 'complex'? First syllable or second syllable? There seem to be two ways in the dictionary.)

2 answers

COMplex is a noun
comPLEX is an adjective

Similar to

PROtest: noun
proTEST: verb
(though you'd never guess it if you listen to the news...)
In your sentence 1, you'd use the second pronunciation Steve gave you for "complex."

Both are fine to use as adjectives in your sentences, yes.