Nonlinear function to linear function conversion (as part of linear regression)

Agent Smith

Full Member
Joined
Oct 18, 2023
Messages
464
How do I change a nonlinear functiom to a linear function?

I'm given y=x2y = x^2 (parabola/quadratic) and asked to convert it into a linear function.
Something to do with x2x^2, but when I try to graph this (on desmos), I still get a parabola.
f(x)=x2f(x) = x^2 (parabola)
g(x)=3f(x)=3x2g(x) = 3f(x) = 3x^2 (which I expected to be linear, because it looks like g(z)=3zg(z) = 3z), is not)

Gracias
 
🤔
A problem in the practice section:
y=x2y = x^2 and y=3x2y = 3x^2. The former is a quadratic and the latter is, they say, linear. However, when I plot these two, I get both as parabolas.
 
Please show exactly what "they" say, in context, including the entire example. You can't change a non-linear function to a linear function, since it isn't. But maybe some particular sort of transformation is allowed, such as a log? We can't know without context.
 
I don't see anything said there, just two ambivalent pictures. Please show the whole context, including whatever is actually said.
 
@Dr.Peterson , it's difficult to keep taking screenshots and uploading them.

The gist of the idea seems to be that

1. If the graph for function f vs. x² is a straightline, f is a quadratic: f = mx² + b

2. If the graph for log f and x is a straight line, f is an exponential function: f = nxn^x

3. If the graph for f and x is a straight line, f is a linear function: y = mx + b

So possibly, if I have f = mx² + b (a quadratic) I can turn it into a linear function. I tried this with f(x) = 3x² + 0 = 3x², but desmos plots it as a parabola/quadratic, not a straight line.

20241204_084224.jpg
From my notes ☝️
 
if I'm understanding this, which it's a fair bet I'm not, OP intends something like this

f(x) is non-linear, however g(x)f(g(x)) is linear.f(x) \text{ is non-linear, however } \exists g(x) \ni f(g(x)) \text{ is linear.}

My reaction is ... ok so?
 
@BeansNRice I believe you nailed it. Can we do that (convert nonlinear to linear) in desmos. I tried with y = mx² + b: y = 3x² + 2 is not linear, it's still a parabola.
 
The gist of the idea seems to be that

1. If the graph for function f vs. x² is a straightline, f is a quadratic: f = mx² + b

2. If the graph for log f and x is a straight line, f is an exponential function: f = nxn^xnx

3. If the graph for f and x is a straight line, f is a linear function: y = mx + b
So there are no actual WORDS you can copy so people can see what someone is supposedly SAYING? And no link you can give for your source?

How do I change a nonlinear functiom to a linear function?

I'm given y=x2y = x^2 (parabola/quadratic) and asked to convert it into a linear function.
Something to do with x2x^2, but when I try to graph this (on desmos), I still get a parabola.
Show us the actual problem as you see it.
🤔
A problem in the practice section:
y=x2y = x^2 and y=3x2y = 3x^2. The former is a quadratic and the latter is, they say, linear. However, when I plot these two, I get both as parabolas.
Show us the actual wording of the problem, in context.

If you can't give specific context, we can't be sure we're suggesting the right answers.
 
Yes, AI can find a variety of different contexts in which one can do something that can be called "converting a nonlinear relationship to a linear relationship". I think it's just trying to guess what you are asking for, by suggesting possibilities.

What's missing here is any information about what the original problem you were asking about wants you to do. Why do you refuse to provide that problem and its context? If you would do that, then someone could answer. All I'm trying to do is to elicit this necessary information. I don't feel like guessing, though I have several ideas about what they might mean.
 
I would like to know how to plot the linear avatar of a nonlinear function with desmos. I can't seem to do that.
From the AI overview, we see that if y=3x2+2y = 3x^2 + 2, we can take x2=ax^2 = a and get a linear equation y=3a+2y = 3a + 2. I tried this with desmos, doesn't work. With google sheets, it works.
 
Isn't this 👉 y=3x2y = 3x^2 and then x2=ax^2 =a and then y=3ay = 3a, function composition? So desmos should've accepted this f(x)=x2,g(f(x))=3f(x)f(x) = x^2, g(f(x)) = 3f(x), but 👇
Capture.PNG

@Dr.Peterson
 
Isn't this 👉 y=3x2y = 3x^2 and then x2=ax^2 =a and then y=3ay = 3a, function composition? So desmos should've accepted this f(x)=x2,g(f(x))=3f(x)f(x) = x^2, g(f(x)) = 3f(x), but 👇
View attachment 38889

@Dr.Peterson
It isn't clear what you expect Desmos to graph here; what you wrote doesn't tell it. You have to speak a particular program's language.

I would like to know how to plot the linear avatar of a nonlinear function with desmos. I can't seem to do that.
From the AI overview, we see that if y=3x2+2y = 3x^2 + 2, we can take x2=ax^2 = a and get a linear equation y=3a+2y = 3a + 2. I tried this with desmos, doesn't work. With google sheets, it works.
If you have a function f(x)=3x2+2f(x)=3x^2+2, and want to express it as a function of u=g(x)=x2u=g(x)=x^2, then you can use h(u)=f(g1(u))=f(u)=3(u)2+2=3u+2h(u)=f(g^{-1}(u))=f(\sqrt{u})=3(\sqrt{u})^2+2=3u+2 (for u0u\ge0):

1733430077876.png

Unfortunately, Desmos doesn't understand inverses, so I had to make g1(u)=ug^{-1}(u)=\sqrt{u} manually.

But what we're doing here is decomposing function f as a composition f=hgf=h\circ g, and h can be obtained as h=fg1h=f\circ g^{-1}.
 
It isn't clear what you expect Desmos to graph here; what you wrote doesn't tell it. You have to speak a particular program's language.


If you have a function f(x)=3x2+2f(x)=3x^2+2, and want to express it as a function of u=g(x)=x2u=g(x)=x^2, then you can use h(u)=f(g1(u))=f(u)=3(u)2+2=3u+2h(u)=f(g^{-1}(u))=f(\sqrt{u})=3(\sqrt{u})^2+2=3u+2 (for u0u\ge0):


Unfortunately, Desmos doesn't understand inverses, so I had to make g1(u)=ug^{-1}(u)=\sqrt{u} manually.

But what we're doing here is decomposing function f as a composition f=hgf=h\circ g, and h can be obtained as h=fg1h=f\circ g^{-1}.
Can you link me to your desmos graph? Thanks
 
Can you link me to your desmos graph? Thanks
No, I deleted it because it's easy enough to replicate. I typed in just what you see. The ideas are more important.

But I suppose I could do more if you would decide to provide the original problem that I've asked for repeatedly, so I could be sure whether this is what you need.
 
@Dr.Peterson I'm just trying to clarify my doubts. At first Google sheets graphs squared perfectly with what was taught in the lessons but then I couldn't get Desmos to do the correct thing. I don't know why g(f(x))=3f(x)g(f(x)) = 3f(x) doesn't return an error and also fails to show a graph.

It's not that I haven't defined the functions
Capture.PNG
 
Last edited:
Top