He had to try something.
( He ( ( had ( to ( try something ) ) ) . ) )
(ROOT (S (NP (PRP He)) (VP (VBD had) (S (VP (TO to) (VP (VB try) (NP (NN something)))))) (. .)))
He didn't need to try anything.
( He ( ( ( did n't ) ( need ( to ( try anything ) ) ) ) . ) )
(ROOT (S (NP (PRP He)) (VP (VBD did) (RB n't) (VP (VB need) (S (VP (TO to) (VP (VB try) (NP (NN anything))))))) (. .)))