They are largely used interchangeably, and 똑같은
can be used instead of 동일한
in your example. There are some subtle differences however.
When comparing two or more objects (either abstract or concrete), if there are no differences at all, you can say they are 똑같다
. You can generally use 동일하다
in this sense too. But if there are only few differences, which make them almost the same, you can say 똑같다
, but not 동일하다
.
이전과 똑같은 소리가 들렸다. (good)
이전과 동일한 소리가 들렸다. (also good)
그 둘은 생김새가 정말 똑같다. (valid)
그 둘은 생김새가 정말 동일하다. (awkward)
젓가락 두 짝이 똑같아요. (valid)
젓가락 두 짝이 동일해요. (awkward)
Also saying that A가 B와 동일하다
often strongly implies that A
and B
are in fact not separate objects, but rather they are one single entity. In other words, 동일하다
often means that A
is B
, and B
is A
.
But this doesn't necessarily mean 똑같다
cannot be used when A
and B
are actually one, and as I said earlier, 똑같다
and 동일하다
are largely considered interchangeable. Differences between them are subtle, and are often ignored too. But a little ambiguity can be caused from time to time too.
그들은 동일한 칫솔로 양치를 한다.
-> strongly implies that they brush their teeth with ONE shared toothbrush.
그들은 똑같은 칫솔로 양치를 한다.
-> can either mean 1) several toothbrushes resembling one another, or 2) the same as above.
In order to resolve this ambiguity, when there in fact is only one toothbrush, use either of 동일하다
or 같다
, as in
그들은 같은 칫솔로 양치를 한다.
-> can only mean there is one toothbrush.
그들은 동일한 칫솔로 양치를 한다.
-> stronly implies that there is one toothbrush.
And to mean there are several toothbrushes that look alike, try to be a little bit more specific, like
그들은 동일하게 생긴 칫솔로 양치를 한다.
-> can only mean several toothbrushes now.
그들은 똑같이 생긴 칫솔로 양치를 한다.
-> the same as above.
Don't worry too much about sounding ambiguous though. People will figure out based on the context, and ask you to clarify if they were too confused.