TORONTO — He has been stuck inside his house in Ottawa since March 12 with his three young children. He has been juggling work meetings on his phone with parenting and household duties normally executed by his staff or his wife, who is sick.

Like millions of people around the world, Justin Trudeau has been improvising a new housebound routine in the time of the new coronavirus. The difference is, he’s running a G7 country.

Mr. Trudeau, Canada’s prime minister, was the first leader of a major industrialized country to go into self-isolation, when his wife, Sophie Grégoire Trudeau, came down with flulike symptoms and later tested positive for the virus.