What would the effects be of a failed German invasion of Norway? The POD being that the Royal Navy manages to sink or turn back enough transports, that the invasion fails within 2 days.
How realistic would this be?
Two days is a bit much. It is unlikely the Allies could have intercepted the German forces moving against Oslo, Kristiansand, and Stavanger, which means the Germans could have established themselves at least in southern Norway.
However, the Allies could have intercepted and destroyed the forces moving against Bergen, Trondheim, and Narvik, which would have kept the Germans out of western Norway.
Norwegian forces in this area could mobilize to fight the Germans, and Allied reinforcements could enter Norway through major ports. (OTL the Allies tried to use minor ports and could not move in enough troops to make a difference.)
There was Norwegian resistance around Oslo for about two days, IIRC; this resistance soon collapsed for want of support. With far more Norwegian forces mobilized and Allied forces arriving in strength, I think that the Germans would be in very great trouble, and would be defeated in about a week - but not two days.
2. what would the long term effects be?
It would delay the replacement of Chamberlain by Churchill. OTL, it was the trigger. But Chamberlain was already dying of cancer, though it was not detected until July.
It is a morale and prestige boost for the Allies, and damage to Hitler and Germany. It breaks Hitler's winning streak. The OTL outcome was yet another dazzling, surprising success for Germany, though not a big one. A nasty setback instead takes away much of that aura of infallibility and invincibility.
However, it probably does not affect the outcome of the Battle of France.
It might deter Mussolini from jumping into the war; he won't be quite as confident of Hitler's complete victory.
It may prevent Britain from launching Operation CATAPULT against the French fleet at Oran. OTL, Britain was fairly worried that if the French battle fleet fell into German hands, then with the German and Italian fleets, the Axis could seriously challenge Britain's control of the Channel and other critical sea areas, and perhaps invade Britain when her army was all but wrecked. TTL, the only German attempt at amphibious invasion was crushed, and the German navy was smashed up even worse than OTL. So Britain would be less fearful, and may just let the French fleet sit. CATAPULT, which resulted in open combat between British and French forces, with thousands of French casualties, turned a lot of Frenchmen against Britain; it was a huge handicap to De Gaulle in winning over French colonies. No CATAPULT, and more French colonies may join Free France.
It would restrict German access to the Atlantic; German ships would have to run a gauntlet between Norway and Scotland before trying to slip through the Greenland-Iceland-Faeroes-Scotland line. OTL the Germans did the latter fairly regularly for a while; the remoteness and generally bad weather made it possible. Add Norway as an Allied base, and the Germans have a much harder task.
It will deter Finland from joining Germany against the USSR in 1941. With Norway as an Ally, attacking the USSR with Germany also commits Finland to war with the western Allies, and Finland doesn't want that at all. Also, Finland's entire Arctic sector is open to attack, with no support.
3. would this effect the German attack in the west?
Might, might not. I don't see any direct effect, other than a possible delay from the shock of a defeat.
Two effects stand out at once too me, any Russian convoys are going too have a much better time, plus southern Norway could be a good place to base bombers to hit Germany.
Allied convoys to the USSR will all go by Murmansk. OTL the Murmansk route was so grim that the Allies shipped aid via Vladivostok (with the accompanying very long rail haul) and around Africa to Iran (with the accompanying demand on shipping and long rail haul). Murmansk is better all ways round. Plus, if Finland is neutral, then Leningrad is not besieged and there is a direct rail connection to the rest of the USSR.
As for the air war: Norway is actually no closer to Germany than eastern England, which is where Bomber Command and later Eighth Air Force operated from. It does provide an additional axis of attack: the Germans would have to deploy substantial air defense forces in Denmark.
Sweden will remain neutral if possible. The Allies will lean on Sweden to cut trade ties with Germany. Sweden can trade with the rest of the world if its ships can pass from its west coast S of Norway; which would be tricky with opposing forces to each side. However, Sweden can also trade via Norway and overland; access to this trade is probably worth more to Sweden than trade with Germany. Germany can't do anything about this, except try to invade Sweden from Denmark.
Just for fun - suppose Germany does try to invade Sweden in the winter of 1940-1941. Much of the Baltic Sea freezes over in winter, which means there could be a good-sized battlefront on the ice...