Brilliant stuff! You've all been very busy while I've been asleep.
1881 Census in Dundee: John M Cowper, 49; wife Mary, 33, born Arbroath; daughter Eliza, 12; son Samuel, 5; daughter Jessie A, 3, father-in-law Samuel Sullivan, 59, born Ireland.
1891 Census in Dundee: Mary Cooper, 42, widow, born Forfar; Samuel, son, 17; Jessie, daughter, 13; John, son, 6; Grace, daughter 4; all born Dundee.
1901: Mary Cooper, 56, born Arbroath; daughter Jessie, 23; son John, 17; daughter Grace, 15; all born Dundee.
Births in Dundee, father Co*per, mother Sullivan
John 1870, died 1873
Mary 1872, died 1873
Samuel 1874
Jessie Alexander 1877
Alexander Speed 1881, died 1884
John Matthewson Cooper married Mary Sullivan in 1867 in Arbroath. John Matthewson Cooper died in Rhynd in 1882 aged 50. (Rhynd is a parish just south of Perth, between the River Tay and the River Earn.)
No death of a Mary Sullivan or Co*per indexed at Scotland's People, which is consistent with Mary having died in Canada.
So it looks as if John and Grace were both illegitimate, born after the death of their mother's husband. Grace's birth certificate will clarify this. It's also indexed as Grace Robertson Sullivan. See screenshot. If it says she was born on 19 July, I think that would nail it.