Creating equation and calculating diesel vs petrol car

Simula

New member
Joined
Sep 27, 2019
Messages
9
So you are buying a car, but you are unsure, should you buy diesel or petrol car.
Tax/year=
Petrol =76€
Diesel=282€

Diesel cost: 1,079€/l
Petrol=1,291€/l

Petrol useage=6,4l/100kmh
Diesel=6,2l/100kmh

Question is, how many kilometres would you need to drive a year, to make diesel the better option?
I'm not sure how to make this to comparing equation or function, between them.
 
Last edited:

lev888

Full Member
Joined
Jan 16, 2018
Messages
543
What's the cost per year? Write both expressions. They should be functions of distance driven. Then you can equate them and solve for the distance.
 

ksdhart2

Senior Member
Joined
Mar 25, 2016
Messages
1,296
A lot of math is really just pattern recognition and critical thinking in "disguise." So many start small and build up from there, seeing if you notice any patterns along the way.

Suppose that you drove each car 100 km in a year. Then the Petrol car would use 6.4L of fuel versus 6.2L for the Diesel. That means the total cost for the Petrol car is \(6.4 \cdot 1.291€ + 76€ = 84.2624€\) whereas the cost of the Diesel car is \(6.2 \cdot 1.079€ + 282€ = 288.6898€\).

Next suppose that you drove each car 1000 km in a year. Then the Petrol car would use 64L of fuel versus 62L for the Diesel. That means the total cost for the Petrol car is \(64 \cdot 1.291€ + 76€ = 158.624€\) whereas the cost of the Diesel car is \(62 \cdot 1.079€ + 282€ = 348.898€\).

Next suppose that you drove each car 2500 km in a year. Then the Petrol car would use 160L of fuel versus 155L for the Diesel. That means the total cost for the Petrol car is \(160 \cdot 1.291€ + 76€ = 282.56€\) whereas the cost of the Diesel car is \(155 \cdot 1.079€ + 282€ = 449.245€\).

What patterns are you noticing emerging here? What would happen if you drove 5000km a year? 14687km a year? For the general case, let \(K\) represent the number of km you drive per year. What would the expressions be then?
 

Simula

New member
Joined
Sep 27, 2019
Messages
9
A lot of math is really just pattern recognition and critical thinking in "disguise." So many start small and build up from there, seeing if you notice any patterns along the way.

Suppose that you drove each car 100 km in a year. Then the Petrol car would use 6.4L of fuel versus 6.2L for the Diesel. That means the total cost for the Petrol car is \(6.4 \cdot 1.291€ + 76€ = 84.2624€\) whereas the cost of the Diesel car is \(6.2 \cdot 1.079€ + 282€ = 288.6898€\).

Next suppose that you drove each car 1000 km in a year. Then the Petrol car would use 64L of fuel versus 62L for the Diesel. That means the total cost for the Petrol car is \(64 \cdot 1.291€ + 76€ = 158.624€\) whereas the cost of the Diesel car is \(62 \cdot 1.079€ + 282€ = 348.898€\).

Next suppose that you drove each car 2500 km in a year. Then the Petrol car would use 160L of fuel versus 155L for the Diesel. That means the total cost for the Petrol car is \(160 \cdot 1.291€ + 76€ = 282.56€\) whereas the cost of the Diesel car is \(155 \cdot 1.079€ + 282€ = 449.245€\).

What patterns are you noticing emerging here? What would happen if you drove 5000km a year? 14687km a year? For the general case, let \(K\) represent the number of km you drive per year. What would the expressions be then?
It is hard for me to create working function to compare these..I could work this out, if I had like "solve costs for 10 000km", but no... I can't go just guessing that cars are going to do 100000km a year, i need to create equation/function that is not guess work.
Km should be the x, the unkown, and I would need to solve that, but that makes no sense..
 

ksdhart2

Senior Member
Joined
Mar 25, 2016
Messages
1,296
I could work this out, if I had like "solve costs for 10 000km"
Well, okay, that's good. That's like 90% of the battle, right there. The rest is just figuring out how to handle it when you have a variable instead of a fixed number. Let's work through the process where K = 10000 and explicitly note each step:

The fuel usage of the cars is given per 100 km so we need to know how many groups of 100 km there are in \(\displaystyle {\color{red}10000} \: km\). Hmm... How many groups of (something) are in (something else)? That sounds precisely like what division is for! So we have \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} = 100\) groups.

Okay, so now we know how many groups there are, and the fuel usage is given in terms of liters per 100 km. Hmm... per? That sounds precisely like the key word from word problems that indicates multiplication! So we have the fuel usage of each car:

Petrol: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.4 \: L = 640 \: L\)

Diesel: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.2 \: L = 620 \: L\)

The cost of fuel is given in terms of euros per liter. We know how many liters of fuel each car uses, so that tells us we can use dimensional analysis to get the cost in euros:

Petrol: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} = 826.24€\)

Diesel: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} = 668.98€\)

And finally we can add in the flat tax per year:

Petrol: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} + 76€ = 902.24€\)

Diesel: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} + 282€ = 950.98€\)

Okay, so what if we tried a different fixed value? Let K = 7892

Petrol: \(\displaystyle \frac{{\color{red}7892} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} + 76€ \approx 728.07€\)

Diesel: \(\displaystyle \frac{{\color{red}7892} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} + 282€ \approx 818.77€\)

One more, just for good measure. Let K = 14687

Petrol: \(\displaystyle \frac{{\color{red}14687} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} + 76€ \approx 1289.50€\)

Diesel: \(\displaystyle \frac{{\color{red}14687} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} + 282€ \approx 1280.92€\)



If it worked for these "real" values, it only makes sense the exact same process would work for an unknown value, right? You may not (yet) know the exact value of \(K\), but you do know it's definitely a number. And that means you can treat it exactly like you would any other number, and work with it in exactly the same ways.

Almost all of math can be tackled in this way. Start small and build up from there. Or use "obvious" examples you know how to solve and think carefully about why that was the answer and how you arrived at that conclusion.
 

Simula

New member
Joined
Sep 27, 2019
Messages
9
Well, okay, that's good. That's like 90% of the battle, right there. The rest is just figuring out how to handle it when you have a variable instead of a fixed number. Let's work through the process where K = 10000 and explicitly note each step:

The fuel usage of the cars is given per 100 km so we need to know how many groups of 100 km there are in \(\displaystyle {\color{red}10000} \: km\). Hmm... How many groups of (something) are in (something else)? That sounds precisely like what division is for! So we have \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} = 100\) groups.

Okay, so now we know how many groups there are, and the fuel usage is given in terms of liters per 100 km. Hmm... per? That sounds precisely like the key word from word problems that indicates multiplication! So we have the fuel usage of each car:

Petrol: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.4 \: L = 640 \: L\)

Diesel: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.2 \: L = 620 \: L\)

The cost of fuel is given in terms of euros per liter. We know how many liters of fuel each car uses, so that tells us we can use dimensional analysis to get the cost in euros:

Petrol: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} = 826.24€\)

Diesel: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} = 668.98€\)

And finally we can add in the flat tax per year:

Petrol: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} + 76€ = 902.24€\)

Diesel: \(\displaystyle \frac{{\color{red}10000} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} + 282€ = 950.98€\)

Okay, so what if we tried a different fixed value? Let K = 7892

Petrol: \(\displaystyle \frac{{\color{red}7892} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} + 76€ \approx 728.07€\)

Diesel: \(\displaystyle \frac{{\color{red}7892} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} + 282€ \approx 818.77€\)

One more, just for good measure. Let K = 14687

Petrol: \(\displaystyle \frac{{\color{red}14687} \: km}{100 \: km} \times 6.4 \: L \times \frac{1.291€}{1 \: L} + 76€ \approx 1289.50€\)

Diesel: \(\displaystyle \frac{{\color{red}14687} \: km}{100 \: km} \times 6.2 \: L \times \frac{1.097€}{1 \: L} + 282€ \approx 1280.92€\)



If it worked for these "real" values, it only makes sense the exact same process would work for an unknown value, right? You may not (yet) know the exact value of \(K\), but you do know it's definitely a number. And that means you can treat it exactly like you would any other number, and work with it in exactly the same ways.

Almost all of math can be tackled in this way. Start small and build up from there. Or use "obvious" examples you know how to solve and think carefully about why that was the answer and how you arrived at that conclusion.
Thanks to your help, I think i got a lot closer to the solution.
I did some graphs, with GeoGebra, and got 13099km, as the even point for petrol and diesel.
With
f(x)=6.4x*1.291+76
g(x)=6.2x*1.079+282

And with those functions, graphs meet at 1158,32, 130.99,

13099/100x6,4x1,291+76=1158,29 €

13099/100x6,2x1,079+282=1158,29 €

f(130,99)=6,4 x 130,99x1,291+76=1158,291€


But still, even with your best efforts, I couldn't figure out, how I would had solved this without graphs or just trying to narrow it down..
I am wondering, how you got to 14687, which is fairly close to my answer (if I didn't fail at some point).
 

lev888

Full Member
Joined
Jan 16, 2018
Messages
543
But still, even with your best efforts, I couldn't figure out, how I would had solved this without graphs or just trying to narrow it down..
Don't need graphs - see my reply above.
 

ksdhart2

Senior Member
Joined
Mar 25, 2016
Messages
1,296
I am wondering, how you got to 14687
14687 was just a random number I made up off the top of my head, that has no bearing on what may or may not be the solution.

But still, even with your best efforts, I couldn't figure out, how I would had solved this without graphs or just trying to narrow it down..
Yeah, if you're just hunting and pecking with graphs and trying various numbers until they work, you're in for a very bad time. Presuming that your variable \(x\) stands for "the number of kilometers driven divided by 100," you've correctly identified two functions \(f(x)\) that models for the cost of the petrol vehicle and \(g(x)\) that models the cost of the diesel car. You want to find where these are equal. Symbolically that's represented by:

\(\displaystyle f(x) = g(x)\)

You've also got two equations explicitly defining these functions:

\(\displaystyle f(x) = 6.4x \cdot 1.291+ 76\)

\(\displaystyle g(x) = 6.2x \cdot 1.079 + 282\)

Now, remember what the equals sign really means. It means whatever's on the left has the same value as the whatever's on the right. It then stands to reason that anywhere you see an \(f(x)\) you can instead write \(6.4x \cdot 1.291+ 76\), yeah? And likewise with the expression for \(g(x)\). Let's do that now:

\(\displaystyle 6.4x \cdot 1.291+ 76 = 6.2x \cdot 1.079 + 282\)

Multiplication is commutative (which means the order doesn't matter) so:

\(\displaystyle 6.4x \cdot 1.291 = 6.4 \cdot x \cdot 1.291 = 6.4 \cdot 1.291 \cdot x = 8.2624x\)

\(\displaystyle 6.2x \cdot 1.079 = 6.2 \cdot x \cdot 1.079 = 6.2 \cdot 1.079 \cdot x = 6.6898x\)

That means the main equation you want to solve can be reduced to:

\(\displaystyle 8.2624x+ 76 = 6.6898x + 282\)

What would your next step be? How might you get only terms with \(x\) in them on the left and only number terms on the right? Don't forget that once you've solved for \(x\), it needs to be multiplied by 100 to get the actual number of kilometers driven.
 
Last edited:

Simula

New member
Joined
Sep 27, 2019
Messages
9
14687 was just a random number I made up off the top of my head, that has no bearing on what may or may not be the solution.



Yeah, if you're just hunting and pecking with graphs and trying various numbers until they work, you're in for a very bad time. Presuming that your variable \(x\) stands for "the number of kilometers driven divided by 100," you've correctly identified two functions \(f(x)\) that models for the cost of the petrol vehicle and \(g(x)\) that models the cost of the diesel car. You want to find where these are equal. Symbolically that's represented by:

\(\displaystyle f(x) = g(x)\)

You've also got two equations explicitly defining these functions:

\(\displaystyle f(x) = 6.4x \cdot 1.291+ 76\)

\(\displaystyle g(x) = 6.2x \cdot 1.079 + 282\)

Now, remember what the equals sign really means. It means whatever's on the left has the same value as the whatever's on the right. It then stands to reason that anywhere you see an \(f(x)\) you can instead write \(6.4x \cdot 1.291+ 76\), yeah? And likewise with the expression for \(g(x)\). Let's do that now:

\(\displaystyle 6.4x \cdot 1.291+ 76 = 6.2x \cdot 1.079 + 282\)

Multiplication is commutative (which means the order doesn't matter) so:

\(\displaystyle 6.4x \cdot 1.291 = 6.4 \cdot x \cdot 1.291 = 6.4 \cdot 1.291 \cdot x = 8.2624x\)

\(\displaystyle 6.2x \cdot 1.079 = 6.2 \cdot x \cdot 1.079 = 6.2 \cdot 1.079 \cdot x = 6.6898x\)

That means the main equation you want to solve can be reduced to:

\(\displaystyle 8.2624x+ 76 = 6.6898x + 282\)

What would your next step be? How might you get only terms with \(x\) in them on the left and only number terms on the right? Don't forget that once you've solved for \(x), it needs to be multiplied by 100 to get the actual number of kilometers driven.

Ooh thank you, I finaly heard a "click" on my brain, this should had been the way to go.

8,2624x+76=6,6898x+282

=8,2624x-6,6898x=282-76

=1,5726x=206 /1,5726

=x=130,993

130,9932 x 100 =13099,32 km
 

ksdhart2

Senior Member
Joined
Mar 25, 2016
Messages
1,296
Ooh thank you, I finaly heard a "click" on my brain, this should had been the way to go.

8,2624x+76=6,6898x+282

=8,2624x-6,6898x=282-76

=1,5726x=206 /1,5726

=x=130,993

130,9932 x 100 =13099,32 km
Correct. There you go! If you drive more than 13,100 km in a year then the diesel car is cheaper; else the petrol car is the way to go. I guess it just depends on if you can see yourself driving an average of 36 km per day or not. To me that seems like a lot of driving...
 

Subhotosh Khan

Super Moderator
Staff member
Joined
Jun 18, 2007
Messages
19,081
Correct. There you go! If you drive more than 13,100 km in a year then the diesel car is cheaper; else the petrol car is the way to go. I guess it just depends on if you can see yourself driving an average of 36 km per day or not. To me that seems like a lot of driving...
That amounts to ~8000 miles/year. Actually less than average US cars...
 
Top