First, some clarification.
Are you trying to just learn an existing spell without a formula, or are you trying to invent a completely new, unique spell?
Creating brand new spells from scratch isn't covered in the rules, and neither is writing out your own spell formulas. It just hasn't been included in the 5th edition rules.
If we go back to 4th edition, the rules have a pretty well laid out system for spell design, which includes rules for designing your own spells, with modifiers for doing it from scratch or after observing someone else spellcasting. And that would include creating spell formulas for existing spells. Those rules are in the 4e book Street Magic.
I recommend avoiding trying to invent your own new spell as the 5th edition rules for spells doesn't follow the same sort of formula (drain calculation is very different). But the thresholds for creating spell formula would hold pretty well, the scale of thresholds and intervals didn't change very much between 4th edition and 5th.
Aside from creating the formula, as far learning spells from those formulas, the rules are pretty straight-forward (pg 299).
The thing you might be overlooking is the time required for this. Creating your own spell formula from scratch is not an easy (or quick) task. Just to give you an idea, the test for creating a Combat spells is Threshold 12 with an interval of 3 months. To put that in perspective, a character with a dice pool of 12 in Arcana (the skill you would need to use for creating a new formula), would take on average 4 intervals to complete that task. So in total, that is a full year to create your own formula. As opposed to going out and buying the formula from a local talismonger for 2,000 nuyen and it would take maybe a week (assuming you fail on a first attempt). The delivery time is only 2 days (threshold
.
Keep in mind to that the interval assumes you are doing nothing else intensive during that time! (So a year away from doing Runs!).
Given the fact that spell formulas can be easily bought online or from a talislegger, makes me wonder why someone would spend an entire year of their life making their own Lightning bolt formula that does EXACTLY the same thing as the one he could have bought online. <Shrug>
(Also keep in mind once he has the formula, he still has to learn to CAST it! Separate tests, and checks, and time! Yes, even though you created a formula, it doesn't mean you 'know' it to use it... yes its very odd..)
Now, if you are looking at creating your own unique spell... Well I'd love to see what you come up with, and maybe we can help balance it out for you. But as a general rule, this is a path you probably don't want to go down..
3) Develop a spell formula and test it . . .
Its step 3 where I start running into trouble. Would you have it work perfectly, fizzle and do nothing, explode in their face, generate sparks but not a proper lightning bolt for a few attempts. How do you work out if a spell research succeeds or fails? Have them roll to learn a new spell without telling them what they actually need for your "lightning bolt" spell?
Did they pass the threshold of the creation test AND the learning test? Then the spell works! Describe it as you choose.
If they did not, then they failed to properly learn the spell and it fails.. Describe it as you choose.
Hard to really be more accurate then that, as a what happens when a Spell fails depends on the spell. A combat spell probably would fail in some way related to the spell, so a Fireball spell might just make a big cloud of thin smoke (no vision modifiers), a lightning bolt might ground itself harmlessly to a metal structure, an invisibility spell might make the character GLOW until dropped... etc.