You can certainly patch the crack using a concrete repair product such as Dunlop 5kg Ardit Rapidset Repair Mortar. This will give you a solid, durable fill that can be painted over once cured. Keep in mind that if there is any movement between the two sections of the slab, even slight settling or temperature-related expansion, the crack is likely to reappear, at least as a hairline.
A good alternative, especially for outdoor slabs that may experience some movement, is to use a flexible polyurethane sealant like Sikaflex 11FC. This type of sealant moves with the concrete and is less likely to crack again, making it more suitable for areas where some shifting is possible. You simply clean out the crack, remove any loose debris, and then fill it with the sealant, smoothing it off as needed. Use a gap-filling rod pushed into the crack around 10mm below the surface. This prevents wastage of the Sika and gives you something to fill over.
Once cured, it can be painted over, giving a neat finish while accommodating the natural movement of the slab.
Please let me know if you have any questions.
Mitchell