Is it possible to use a power plant-like machine to create small amounts of electrical (or other) energy directly inside the human body, making it such that the human has energy for activity without the need to eat? Something like directly giving the person heat or electricity for human energy or something like photosynthesis using solar panels and such.
Yes and no.
You can invert the glucose cycle using a machine performing electrosynthesis - converting carbon dioxide and water back into glucose. Then you beam energy to the machine, and Bob's your uncle.
But it's not enough - human beings don't eat just to replace spent energy, they also require basic substances to perform maintenance on their organisms, and there are several more chemical processes that can't be inverted in the lungs. Even if you succeeded into tapping into the lower intestine and recovering basic matter from there, a lot of volatile compounds - starting with water vapour - would still be lost (plus the ordinary wear and tear on skin, hair, nails and so on). To recover that, you would need a Fremen's "stillsuit" (actually even more than that. With some sort of motile or recirculating gel on the inside, that could recover shed skin and hair for recycling).
However, with the basic energy needs covered by a "simple" electrosynthesis machine, you could do without food and maybe even water for substantial periods.
You could imagine a small container with some genetically engineered algae with crazy growth rates, illuminated by tuned LEDs on the inside (and maybe being fed slush pumped from the lower intestine). There are no natural vegetal organisms that could keep up with the metabolism of a human being, but if there were, such an internal "micro-greenhouse" could work. A part of the algae would be harvested every few hours and simply dumped into the stomach, solving many of the problems raised by Adrian Hall (maintaining the gut microbiome, exerting the stomach and guts, avoiding interfering with glicemic levels).
(There would now be the problem of cooling the device: photosynthesis is not energetically efficient, and a great deal of the incoming energy, once turned into light, would then further turn into waste heat. Having a small furnace inside your lungs might get old real quick).
It is very possible to sustain a human being (even a physically active one) without them having to eat at all.
Gastrostomy tubes go from outside of the body directly into the stomach. But what you put in there is basically identical to food (with some restrictions). Someone can get all of their nutrition and fluid needs this way. They'd only need some water to moisten their mouth and throat, but that's optional.
Parenteral nutrition (PN) is the feeding of specialist nutritional products to a person intravenously, bypassing the usual process of eating and digestion...The person receives highly complex nutritional formulae that contain nutrients such as glucose, salts, amino acids, lipids and added vitamins and dietary minerals. It is called total parenteral nutrition (TPN) or total nutrient admixture (TNA) when no significant nutrition is obtained by other routes, and partial parenteral nutrition (PPN) when nutrition is also partially enteric. It may be called peripheral parenteral nutrition (PPN) when administered through vein access in a limb rather than through a central vein as central venous nutrition (CVN).
A friend of mine lived for years with a central line. She drank some water and ate tiny amounts to keep her gut going (it was severely damaged) but otherwise, got 100% of her energy and nutritional input from the central line. She was very active and could go sailing or on hikes. The port of the line disconnects easily so she was not tethered to it. As long as she connected for a few hours day and night, she was fine.
If you're asking if a human could survive off of some sort of electrical energy, well no. Energy for humans (and most animals) is from calories.
The Calorie (large calorie or kilocalorie — symbols: Cal, kcal), also known as the food calorie, is defined as the heat energy involved in warming one kilogram of water by one degree Celsius.
Although calories are heat energy, delivering heat to people doesn't do the same thing. If it did, no one would starve in tropical countries. Our bodies work as transformers, the interface between materials in the outside world and producing energy within our bodies. There isn't a substitute.
So, yes, you can create systems where humans do not have to eat. Meaning they do not have to take anything by mouth or even through their stomachs and digestive tracts. But you can not bypass the body's systems for breaking down calories and nutrients.
You probably should expand on the question to make it clear what you actually need but...
Recycling with implants
Your body converts sugars and oxygen to energy and carbon dioxide (plus some water). You can implant a machine that takes water and carbon dioxide from the blood stream and converts them to sugars using energy supplied by an external source. This would reduce the need to eat and breathe as long as energy is supplied.
The above is for the aerobic metabolism, you can do a variant for the anaerobic metabolism but it is probably a bad idea unless your implants are nanomachines inside every cell and can boost the cellular metabolism directly.
For all practical purposes, no.
There are lots of answers about how this would happen in theory. I just thought I might add some engineering concerns:
The "hungry" and "full" signals are sent by the stomach in response to food volume, not energy presence.
So you'd feel starving, and your body would act as if it were starving, converting body mass to fat and increasing your appetite. You would gain a lot of weight, and suffer chronic health issues. You'd be constantly fatigued as your body tried to conserve energy. Your stomach acid might also burn holes in the lining, causing ulcers - it's meant to be diluted by food.
This could be solved by hormone injections to simulate fullness and proton pump inhibitors or pH buffers to calm your empty digestive tract. Even so, the cocktail would be different for every person, would probably change per day, and would ultimately require chemically nourishing the person, despite your question's demands.
The lack of nutrients is an obvious one, as many answers have already addressed.
There are chemicals you completely break down or otherwise alter beyond any simple means of reconstruction (think urea...); these would have to be replaced.
You lose tons of water. There's no getting around that. You could have a machine that electrically pulls water out of the air, I suppose.
Also, when you get tired, it's not just because your blood sugar drops: you have a bunch of processes we don't fully understand that contribute to feeling exhausted.
So a solution centered around glucose injection would increase short-term energy but not make you feel energetic, or even stop you feeling exhausted.
Part of this comes from the fact that what we mean by your "energy level" as a person is only loosely related to actual energy in the physics sense. Caffeine makes you feel awake, you can feel sleepy after dessert, muscles can be sore and tired due to microscopic tears in the proteins or lactic acid build-up, people feel like their social energy depends on how often that talk to people.
Another part comes from the fact that we store energy in many different places: glycogen, fat, ATP, simple sugars, electrolyte concentrations... If you raise blood sugar directly, you get the problems seen by people with type 1 diabetes: grumpiness and passing lots of water among others. You can't cause an artificial change in long-term energy storage without implanting fat or something. This is a problem because the body is very particular about its composition and the amount of energy in different locations. If your balance is off for what your body wants, you will have side effects.
There are long-term problems with changing the amount of energy in the body artificially.
The body maintains homeostasis through negative feedback systems. When blood sugar rises, your body sends a signal to lower it. The cells respond by taking in sugar from the blood. The machine puts more sugar in. At some point, the cells stop responding to the biological signal, and you have type 2 diabetes.
If you change fat into sugar very quickly, the body panics and turns lots of sugar into fat for weeks. This kind of thing messed with your hormone balance and will cause problems unrelated to metabolism.
You also have a gut microbiome of bacteria that help you digest things. Without the food input into your intestines, these guys will die. Problem is, they do way more than just digest. Lots of them help produce chemicals you can't make yourself, and there's evidence to show that they communicate chemically with the brain. If they all die, you'll suffer the effects of their absence.
So yeah, good luck getting this to work. Interesting question though.
Eliminating the need to eat is really hard with any sort of real science(ish). You're basically into teleportation, super powers, and/or magic.
Now wireless charging does exist, can be made reasonably small, and presumably would work for broadcast energy. So in theory cyborg implants or just robots could be (re)charged.
If we extend that to "brain in a robot body" then we're pretty close.
If you begin to go cybernetic, you may need a form of electrical power. As others stated above, straight up powering biological organs via conventional electricity would not be possible, you would have to create an artificial step to allow for it.
Now if you start replacing organs of the body with straight up machines, such as an electrical pump for the heart or servos in prosthetics limbs, they may need electrical power as it would be difficult to power them via biological means. (I know some pacemakers use some form of body power already.)
You could certainly severely reduce the amount of food people would need to consume. It would have to be nutrient-packed and not very energy-dense.
If you were trying to reduce people's reliance on food crops, for instance, or allow people to go weeks without food (military activities?), you could implant a network of nanobots that could do glucose metabolism in reverse, and you could wirelessly power that.